|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ru.yandex.bolts.collection.CollectionsF
public class CollectionsF
Utilities to create extended collections.
Constructor Summary | |
---|---|
protected |
CollectionsF()
|
Method Summary | ||
---|---|---|
static
|
arrayList()
Create extended mutable array list. |
|
static
|
arrayList(A... elements)
Create extended array list of elements. |
|
static
|
arrayList(Collection<A> collection)
Create extended mutable array list containing given elements. |
|
static
|
arrayList(int initialCapacity)
Create array list with given capacity. |
|
static
|
concurrentHashMap()
Wrapper around ConcurrentHashMap . |
|
static
|
emptyIterator()
Empty iterator. |
|
static
|
hashMap()
Create hash map. |
|
static
|
hashMap(Iterable<Tuple2<K,V>> entries)
Create hash map of specified entries. |
|
static
|
hashSet()
Create mutable hash set. |
|
static
|
hashSet(Collection<E> collection)
Create mutable hash set of specified elements. |
|
static
|
hashSet(E... elements)
Create mutable hash set of specified elements. |
|
static
|
hasNextF()
Iterator.hasNext() as function |
|
static
|
identityHashMap()
Identity hash map. |
|
static
|
identityHashSet()
Create mutable identity hash set. |
|
static
|
identityHashSet(Collection<E> elements)
Create mutable identity hash set with specified elements. |
|
static
|
identityHashSet(E... elements)
Create mutable identity hash set with specified elements. |
|
static
|
iteratorF()
Iterable.iterator() as function |
|
static
|
linkedList()
Create extended linked list. |
|
static
|
list()
Empty immutable list. |
|
static
|
list(Collection<E> elements)
Create list of elements from given collection. |
|
static
|
list(E... elements)
Create list of specified elements. |
|
static
|
list(E e)
Immutable singleton list. |
|
static
|
list(E e1,
E e2)
Immutable list with two elements. |
|
static
|
listPlusF()
Concatenate two lists function |
|
static
|
map()
Immutable empty map. |
|
static
|
map(Collection<Tuple2<K,V>> pairs)
Create map from sequence of entries |
|
static
|
map(K key,
V value)
Singleton map. |
|
static
|
map(K key1,
V value1,
K key2,
V value2)
Map of either 1 or 2 entries. |
|
static
|
mapPlusF()
MapF.plus(MapF) as function. |
|
static ListF<Integer> |
range(int startInclusive,
int endExclusive)
Immutable list of integer in given range. |
|
static
|
repeat(T element,
int times)
Immutable list of element repeated times times. |
|
static
|
set()
Empty set |
|
static
|
set(Collection<E> elements)
Create set of elements from collection. |
|
static
|
set(E... elements)
Create set of specified elements |
|
static
|
set(E e1,
E e2)
Create set of specified elements. |
|
static
|
set(E e1,
E e2,
E e3)
Create set of specified elements. |
|
static
|
set(T o)
Create singleton set |
|
static
|
setPlusF()
Union of two sets function |
|
static
|
sizeF()
Collection.size() as function |
|
static
|
sizeM()
Deprecated. |
|
static
|
treeSet()
Create extended tree set. |
|
static
|
treeSet(Collection<E> collection)
Create tree set of specified elements. |
|
static
|
treeSet(E... elements)
Create tree set of specified elements. |
|
static
|
wrap(Collection<E> coll)
Wrap Collection. |
|
static
|
wrap(E[] array)
Wrap array. |
|
static
|
wrap(Iterator<E> iter)
Wrap Iterator. |
|
static
|
wrap(List<E> list)
Wrap List. |
|
static
|
wrap(Map<K,V> map)
Wrap Map. |
|
static MapF<String,String> |
wrap(Properties ps)
Wrap Properties. |
|
static
|
wrap(Set<E> set)
Wrap Set. |
|
static
|
wrapIteratorF()
x(Iterator) as function |
|
static
|
wrapIteratorM()
Deprecated. |
|
static
|
wrapListF()
x(List) as function |
|
static
|
wrapListM()
Deprecated. |
|
static
|
wrapMapF()
x(Map) as function |
|
static
|
wrapMapM()
Deprecated. |
|
static
|
wrapSetF()
x(Set) as function |
|
static
|
wrapSetM()
Deprecated. |
|
static
|
x(Collection<E> collection)
Wrap collection |
|
static
|
x(E[] array)
Wrap array. |
|
static
|
x(Iterator<E> iterator)
Wrap iterator |
|
static
|
x(List<E> list)
Wrap list |
|
static
|
x(Map<K,V> map)
Wrap map |
|
static MapF<String,String> |
x(Properties properties)
Wrap properties as set of String, String pairs |
|
static
|
x(Set<E> set)
Wrap set |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected CollectionsF()
Method Detail |
---|
public static <E> ListF<E> wrap(List<E> list)
x(List)
public static <E> SetF<E> wrap(Set<E> set)
x(Set)
public static <E> CollectionF<E> wrap(Collection<E> coll)
x(Collection)
public static <E> IteratorF<E> wrap(Iterator<E> iter)
x(Iterator)
public static <K,V> MapF<K,V> wrap(Map<K,V> map)
x(Map)
public static MapF<String,String> wrap(Properties ps)
x(Properties)
public static <E> ListF<E> wrap(E[] array)
x(Object[])
public static <E> IteratorF<E> x(Iterator<E> iterator)
public static <E> CollectionF<E> x(Collection<E> collection)
public static <E> ListF<E> x(List<E> list)
public static <E> SetF<E> x(Set<E> set)
public static <K,V> MapF<K,V> x(Map<K,V> map)
public static MapF<String,String> x(Properties properties)
public static <E> ListF<E> x(E[] array)
Arrays.asList(Object...)
,
list(Object...)
public static <E> SetF<E> set()
public static <T> SetF<T> set(T o)
public static <E> SetF<E> set(E e1, E e2)
public static <E> SetF<E> set(E e1, E e2, E e3)
public static <E> SetF<E> set(E... elements)
public static <E> SetF<E> set(Collection<E> elements)
public static <A> SetF<A> hashSet()
public static <E> SetF<E> hashSet(Collection<E> collection)
public static <E> SetF<E> hashSet(E... elements)
public static <E> SetF<E> identityHashSet()
public static <E> SetF<E> identityHashSet(Collection<E> elements)
public static <E> SetF<E> identityHashSet(E... elements)
public static <A> SetF<A> treeSet()
public static <E> SetF<E> treeSet(Collection<E> collection)
public static <E> SetF<E> treeSet(E... elements)
public static <E> ListF<E> list()
public static <E> ListF<E> list(E e)
public static <E> ListF<E> list(E e1, E e2)
public static <E> ListF<E> list(E... elements)
for real array wrapping
public static <E> ListF<E> list(Collection<E> elements)
public static <E> ListF<E> arrayList()
public static <A> ListF<A> arrayList(Collection<A> collection)
public static <A> ListF<A> arrayList(A... elements)
public static <A> ListF<A> arrayList(int initialCapacity)
ArrayList.ArrayList(int)
public static <K,V> MapF<K,V> map(K key, V value)
public static <K,V> MapF<K,V> map(K key1, V value1, K key2, V value2)
public static <K,V> MapF<K,V> map(Collection<Tuple2<K,V>> pairs)
public static <K,V> MapF<K,V> map()
public static <E> ListF<E> linkedList()
public static <K,V> MapF<K,V> hashMap()
HashMap
public static <K,V> MapF<K,V> identityHashMap()
IdentityHashMap
public static <K,V> MapF<K,V> hashMap(Iterable<Tuple2<K,V>> entries)
HashMap
public static <K,V> MapF<K,V> concurrentHashMap()
ConcurrentHashMap
.
public static <E> IteratorF<E> emptyIterator()
public static <T> ListF<T> repeat(T element, int times)
element
repeated times
times.
public static ListF<Integer> range(int startInclusive, int endExclusive)
end < start
public static <A,B> Function2<MapF<A,B>,MapF<A,B>,MapF<A,B>> mapPlusF()
MapF.plus(MapF)
as function.
public static <A> Function2<ListF<A>,ListF<A>,ListF<A>> listPlusF()
public static <A> Function2<SetF<A>,SetF<A>,SetF<A>> setPlusF()
public static <E> Function<List<E>,ListF<E>> wrapListM()
public static <E> Function<List<E>,ListF<E>> wrapListF()
x(List)
as function
public static <E> Function<Set<E>,SetF<E>> wrapSetM()
public static <E> Function<Set<E>,SetF<E>> wrapSetF()
x(Set)
as function
public static <K,V> Function<Map<K,V>,MapF<K,V>> wrapMapM()
public static <K,V> Function<Map<K,V>,MapF<K,V>> wrapMapF()
x(Map)
as function
public static <E> Function<Iterator<E>,IteratorF<E>> wrapIteratorM()
public static <E> Function<Iterator<E>,IteratorF<E>> wrapIteratorF()
x(Iterator)
as function
public static <T> Function<Collection<T>,Integer> sizeM()
public static <T> Function<Collection<T>,Integer> sizeF()
Collection.size()
as function
public static <T> Function1B<Iterator<T>> hasNextF()
Iterator.hasNext()
as function
public static <T> Function<Iterable<T>,IteratorF<T>> iteratorF()
Iterable.iterator()
as function
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |