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

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

public class ExtendedSet<T>
extends AbstractSet<T>

An extended Set. Given a base set, additional items can be stored into a secondary set that does not modify the base set. This is useful if you need to share a base set accross a number of jobs that may add items to the set in different ways, but should not see these changes accross jobs.

Author:
Keith Stevens

Constructor Summary
ExtendedSet(Set<T> initialSet)
          Creates the ExtendedSet
ExtendedSet(Set<T> initialSet, Set<T> secondSet)
          Creates the ExtendedSet
 
Method Summary
 boolean add(T item)
          
 Iterator<T> iterator()
          
 int size()
          
 
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
 
Methods inherited from class java.util.AbstractCollection
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
addAll, clear, contains, containsAll, isEmpty, remove, retainAll, toArray, toArray
 

Constructor Detail

ExtendedSet

public ExtendedSet(Set<T> initialSet)
Creates the ExtendedSet


ExtendedSet

public ExtendedSet(Set<T> initialSet,
                   Set<T> secondSet)
Creates the ExtendedSet

Method Detail

add

public boolean add(T item)

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

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.