|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
ObjectReversibleSet<T>
public class ReversibleSet<T> extends Object implements ISimpleSet<T>
| Modifier and Type | Field and Description |
|---|---|
ReversibleMultiMap<T,Boolean> |
map
|
| Constructor and Description |
|---|
ReversibleSet()
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(T elt)
Adds the given elt to the set. |
boolean |
contains(T elt)
Returns true if elt is in this set. |
Set<T> |
getElements()
Returns the elements in this set, as a java.util.Set |
void |
mark()
|
void |
remove(T elt)
Removes the given elt from the set. |
int |
size()
Returns the size of this set. |
String |
toString()
Returns a String representation of this set. |
void |
undoToLastMark()
|
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public final ReversibleMultiMap<T,Boolean> map
| Constructor Detail |
|---|
public ReversibleSet()
| Method Detail |
|---|
public void add(T elt)
ISimpleSet
add in interface ISimpleSet<T>elt - cannot be null.public boolean contains(T elt)
ISimpleSet
contains in interface ISimpleSet<T>elt - cannot be null.public Set<T> getElements()
ISimpleSet
getElements in interface ISimpleSet<T>public void remove(T elt)
ISimpleSet
remove in interface ISimpleSet<T>elt - cannot be null.public int size()
ISimpleSet
size in interface ISimpleSet<T>public void mark()
public void undoToLastMark()
public String toString()
ISimpleSet
toString in interface ISimpleSet<T>toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||