org.modeshape.common.collection
Class Collections
java.lang.Object
org.modeshape.common.collection.Collections
public class Collections
- extends Object
A set of utilities for more easily creating various kinds of collections.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Collections
public Collections()
unmodifiableSet
public static <T> Set<T> unmodifiableSet(T... values)
unmodifiableSet
public static <T> Set<T> unmodifiableSet(Collection<T> values)
unmodifiableSet
public static <T> Set<T> unmodifiableSet(Set<T> values)
concat
public static <T> Iterable<T> concat(Iterable<T> a,
Iterable<T> b)
- Concatenate two Iterable sources
- Type Parameters:
T
- the value type- Parameters:
a
- a non-null Iterable valueb
- a non-null Iterable value
- Returns:
- an Iterable that will iterate through all the values from 'a' and then all the values from 'b'
concat
public static <T> Iterator<T> concat(Iterator<T> a,
Iterator<T> b)
- Concatenate two Iterators
- Type Parameters:
T
- the value type- Parameters:
a
- a non-null Iteratorb
- a non-null Iterator
- Returns:
- an Iterator that will iterate through all the values of 'a', and then all the values of 'b'
Copyright © 2008-2013 JBoss, a division of Red Hat. All Rights Reserved.