|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jclass.SimpleSet
A class reprezenting a simple set of objects which allows also
synchronized access. Inside a set there are no two equal objects.
In order to be consistently handled by this class, the objects
that are to be included here should implement the equals() and
hashCode() methods properly.
Should implement reunion, intersection etc. !? ;)
Written: Radu Sion
Version: 0.15a
Source: SimpleSet.java
Visit
Smart Software
Object.equals(java.lang.Object)
,
Object.hashCode()
Constructor Summary | |
SimpleSet()
Constructs a new empty set. |
Method Summary | |
void |
add(java.lang.Object oo)
Adds a new object to the set ( no testings are done on the object ) |
java.util.Enumeration |
elements()
Returns an enumeration of the values in this set. |
boolean |
isEmpty()
Tests if the set is empty |
boolean |
isInSet(java.lang.Object oo)
Finds out if a certain object is inside the current set. |
void |
remove(java.lang.Object oo)
Removes a given object from the set (no testings are done on the object) |
int |
size()
Returns the current size (objects) of the set |
java.lang.String |
toString()
|
java.util.Vector |
toVector()
Returns a vector with the objects in this set. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public SimpleSet()
Method Detail |
public boolean isEmpty()
public int size()
public boolean isInSet(java.lang.Object oo)
oo
- Object to look forpublic void add(java.lang.Object oo)
oo
- The object to add to this setpublic void remove(java.lang.Object oo)
oo
- The object to remove from this setpublic java.util.Enumeration elements()
public java.util.Vector toVector()
public java.lang.String toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |