Groovy Documentation

org.gradle.util
Class WrapUtil

java.lang.Object
  org.gradle.util.WrapUtil

class WrapUtil
extends java.lang.Object

Common methods to wrap objects in generic collections.


Constructor Summary
WrapUtil()

 
Method Summary
static T[] toArray(T items)

static java.util.Map toLinkedMap(K key, V value)

Wraps the given key and value in a mutable ordered map.

static java.util.Set toLinkedSet(T items)

Wraps the given items in a mutable ordered set.

static java.util.List toList(T items)

Wraps the given items in a mutable list.

static java.util.List toList(java.lang.Iterable items)

Wraps the given items in a mutable list.

static java.util.Map toMap(K key, V value)

Wraps the given key and value in a mutable unordered map.

static java.util.Properties toProperties(java.lang.String key, java.lang.String value)

Wraps the given key and value in a mutable properties instance.

static java.util.Set toSet(T items)

Wraps the given items in a mutable unordered set.

static java.util.SortedMap toSortedMap(K key, V value)

Wraps the given key and value in a mutable sorted map.

static java.util.SortedSet toSortedSet(T items)

Wraps the given items in a mutable sorted set.

static java.util.SortedSet toSortedSet(java.util.Comparator comp, T items)

Wraps the given items in a mutable sorted set using the given comparator.

 
Methods inherited from class java.lang.Object
hashCode, getClass, equals, toString, wait, wait, wait, notify, notifyAll
 

Constructor Detail

WrapUtil

WrapUtil()


 
Method Detail

toArray

public static T[] toArray(T items)


toLinkedMap

public static java.util.Map toLinkedMap(K key, V value)
Wraps the given key and value in a mutable ordered map.


toLinkedSet

public static java.util.Set toLinkedSet(T items)
Wraps the given items in a mutable ordered set.


toList

public static java.util.List toList(T items)
Wraps the given items in a mutable list.


toList

public static java.util.List toList(java.lang.Iterable items)
Wraps the given items in a mutable list.


toMap

public static java.util.Map toMap(K key, V value)
Wraps the given key and value in a mutable unordered map.


toProperties

public static java.util.Properties toProperties(java.lang.String key, java.lang.String value)
Wraps the given key and value in a mutable properties instance.


toSet

public static java.util.Set toSet(T items)
Wraps the given items in a mutable unordered set.


toSortedMap

public static java.util.SortedMap toSortedMap(K key, V value)
Wraps the given key and value in a mutable sorted map.


toSortedSet

public static java.util.SortedSet toSortedSet(T items)
Wraps the given items in a mutable sorted set.


toSortedSet

public static java.util.SortedSet toSortedSet(java.util.Comparator comp, T items)
Wraps the given items in a mutable sorted set using the given comparator.


 

Groovy Documentation