|
Sharkysoft home | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--lava.util.DuplicateIdentifier
Identifies duplicates in an Object stream.
Details: DuplicateIdentifier observes a stream of Objects and determines whether elements in the stream are repeats of previously seen Objects. A repeat is any Object that has the same hash value as a previously seen Object and which is also equal to that Object, as determined by the equals method.
| Constructor Summary | |
DuplicateIdentifier()
|
|
| Method Summary | |
protected void |
finalize()
Clears memory. |
void |
forget(java.lang.Object obj)
Forgets object. |
boolean |
isUnique(java.lang.Object obj)
Determines uniqueness of Object. |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DuplicateIdentifier()
| Method Detail |
public boolean isUnique(java.lang.Object obj)
Details: isUnique remembers the given Object and determines whether its equal has been previously seen in an earlier isUnique call. If the Object's equal has never been seen, isUnique returns true, false otherwise.
obj - the Objectprotected void finalize()
Details: finalize releases Objects from the memory used to identify duplicates.
finalize in class java.lang.Object - - public void forget(java.lang.Object obj)
Details: forget causes this DuplicateIdentifier to forget that it ever saw the given object. A subsequent call to isUnique on the given object will return true as a result, regardless of whether the object has been previously seen or not.
obj - the object
|
Sharkysoft home | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||