ModeShape Distribution 3.5.0.Final

org.modeshape.common.collection
Class Collections

java.lang.Object
  extended by org.modeshape.common.collection.Collections

public class Collections
extends Object

A set of utilities for more easily creating various kinds of collections.


Constructor Summary
Collections()
           
 
Method Summary
static
<T> Iterable<T>
concat(Iterable<T> a, Iterable<T> b)
          Concatenate two Iterable sources
static
<T> Iterator<T>
concat(Iterator<T> a, Iterator<T> b)
          Concatenate two Iterators
static
<T> Set<T>
unmodifiableSet(Collection<T> values)
           
static
<T> Set<T>
unmodifiableSet(Set<T> values)
           
static
<T> Set<T>
unmodifiableSet(T... values)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Collections

public Collections()
Method Detail

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 value
b - 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 Iterator
b - a non-null Iterator
Returns:
an Iterator that will iterate through all the values of 'a', and then all the values of 'b'

ModeShape Distribution 3.5.0.Final

Copyright © 2008-2013 JBoss, a division of Red Hat. All Rights Reserved.