gov.llnl.ontology.util
Class CombinedSet<T>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractSet<T>
          extended by gov.llnl.ontology.util.CombinedSet<T>
All Implemented Interfaces:
Iterable<T>, Collection<T>, Set<T>

public class CombinedSet<T>
extends AbstractSet<T>

A set that is composed of several sets. The original sets are unmodified, even if there are duplicate entries in multiple sets.

Author:
Keith Stevens

Constructor Summary
CombinedSet(Collection<Set<T>> setCollection)
          Creates a CombinedSet from all of the provided Sets.
CombinedSet(Set<T>... sets)
          Creates a CombinedSet from all of the provided Sets.
 
Method Summary
 Iterator<T> iterator()
          
 int size()
          
 
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
 
Methods inherited from class java.util.AbstractCollection
add, addAll, clear, contains, containsAll, isEmpty, remove, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, isEmpty, remove, retainAll, toArray, toArray
 

Constructor Detail

CombinedSet

public CombinedSet(Set<T>... sets)
Creates a CombinedSet from all of the provided Sets.


CombinedSet

public CombinedSet(Collection<Set<T>> setCollection)
Creates a CombinedSet from all of the provided Sets.

Method Detail

iterator

public Iterator<T> iterator()

Specified by:
iterator in interface Iterable<T>
Specified by:
iterator in interface Collection<T>
Specified by:
iterator in interface Set<T>
Specified by:
iterator in class AbstractCollection<T>

size

public int size()

Specified by:
size in interface Collection<T>
Specified by:
size in interface Set<T>
Specified by:
size in class AbstractCollection<T>


Copyright © 2010-2011. All Rights Reserved.