gov.llnl.ontology.util
Class ExtendedSet<T>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractSet<T>
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
ExtendedSet
public ExtendedSet(Set<T> initialSet)
- Creates the
ExtendedSet
ExtendedSet
public ExtendedSet(Set<T> initialSet,
Set<T> secondSet)
- Creates the
ExtendedSet
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.