umontreal.iro.lecuyer.collections
Class TransformingSet<OE,IE>
java.lang.Object
java.util.AbstractCollection<OE>
umontreal.iro.lecuyer.collections.TransformingCollection<OE,IE>
umontreal.iro.lecuyer.collections.TransformingSet<OE,IE>
- Type Parameters:
OE
- the type of the outer elementsIE
- the type of the inner elements
- All Implemented Interfaces:
- Iterable<OE>, Collection<OE>, Set<OE>
public abstract class TransformingSet<OE,IE>
- extends TransformingCollection<OE,IE>
- implements Set<OE>
Represents a set that dynamically transforms the elements of another set.
This class extends the transforming collection to implement the Set
interface.
Constructor Summary |
TransformingSet(Set<IE> innerSet)
Constructs a new transforming set mapping the elements of the inner set
innerSet. |
Methods inherited from interface java.util.Set |
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
TransformingSet
public TransformingSet(Set<IE> innerSet)
- Constructs a new transforming set mapping the elements of the inner set
innerSet.
- Parameters:
innerSet
- the inner set.
- Throws:
NullPointerException
- if innerSet is null.
getInnerCollection
public Set<IE> getInnerCollection()
- Returns the inner set.
- Overrides:
getInnerCollection
in class TransformingCollection<OE,IE>
- Returns:
- the inner set.
equals
public boolean equals(Object o)
- Specified by:
equals
in interface Collection<OE>
- Specified by:
equals
in interface Set<OE>
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Specified by:
hashCode
in interface Collection<OE>
- Specified by:
hashCode
in interface Set<OE>
- Overrides:
hashCode
in class Object
To submit a bug or ask questions, send an e-mail to
Richard Simard.