|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ws4d.java.structures.DataStructure
org.ws4d.java.structures.Set
org.ws4d.java.structures.HashSet
org.ws4d.java.structures.LinkedSet
public class LinkedSet
This class is a hash set, in which the elements are linked together, ordered by their adding to the set. The last added object is added to the end of the sequence. Re-adding an already contained object won't change the order of the set. If touch ordering is set, accessed objects in the set will be moved to the end of the sequence.
Constructor Summary | |
---|---|
LinkedSet()
Constructor. |
|
LinkedSet(DataStructure data)
Constructor. |
|
LinkedSet(int initialCapacity)
Constructor. |
|
LinkedSet(int initialCapacity,
boolean touchOrdering)
Constructor. |
Method Summary | |
---|---|
java.lang.Object |
removeFirst()
Removes the first element in the set. |
void |
touch(java.lang.Object obj)
Moves the touched object to the end of the set if touch ordering is true and the given object is an element of the set. |
Methods inherited from class org.ws4d.java.structures.HashSet |
---|
add, clear, contains, get, isEmpty, iterator, remove, size |
Methods inherited from class org.ws4d.java.structures.Set |
---|
containsAll, equals, getClassShortName, hashCode |
Methods inherited from class org.ws4d.java.structures.DataStructure |
---|
addAll, toArray, toArray, toString |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LinkedSet()
public LinkedSet(DataStructure data)
data
- public LinkedSet(int initialCapacity)
initialCapacity
- public LinkedSet(int initialCapacity, boolean touchOrdering)
initialCapacity
- touchOrdering
- access OrderingMethod Detail |
---|
public void touch(java.lang.Object obj)
obj
- public java.lang.Object removeFirst()
null
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |