|
SolarMetric Kodo JDO 2.5.8 generated on January 11 2004 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--serp.util.OrderedSet
Ordered set data structure that uses a HashMap to
optimize accessing random elements in the list. All methods are
designed with performance in mind, and all operate in constant
time, provided that the hashing function distributes objects among
buckets in an optimal manner.
Additionally, this data structure ensures that there is one and
only one entry for a given value in the list. So, it has some
resemblance to a Set.
Note that this data structure is not sorted -- it is merely ordered. The ordering is defined by the order in which elements are put into the set.
| Inner Class Summary | |
class |
OrderedSet.OrderedSetIterator
Deprecated. |
| Field Summary | |
protected HashMap |
elementMap
Deprecated. A map of objects to Entry objects in the underlying
linked list. |
protected SimpleLinkedList |
list
Deprecated. The linked list that this set uses to maintain ordering. |
| Constructor Summary | |
OrderedSet()
Deprecated. Create an ordered set using the default constructor for the HashMap used for random element access. |
|
OrderedSet(int initialCapacity)
Deprecated. Create an ordered set using the specified initial capacity for the HashMap used for random element access. |
|
OrderedSet(int initialCapacity,
float loadFactor)
Deprecated. Create an ordered set using the specified initial capacity and load factor for the HashMap used for random element
access. |
|
| Method Summary | |
boolean |
add(Object o)
Deprecated. Adds o to the end of this ordered set. |
boolean |
addAll(Collection c)
Deprecated. |
void |
append(Object o)
Deprecated. Appends o to the end of this ordered set, or
moves it to the end if it already exists in the set. |
void |
clear()
Deprecated. |
boolean |
contains(Object o)
Deprecated. |
boolean |
containsAll(Collection c)
Deprecated. |
boolean |
equals(Object ob)
Deprecated. |
Object |
first()
Deprecated. |
SimpleLinkedList.Entry |
getEntry(Object o)
Deprecated. |
int |
hashCode()
Deprecated. |
boolean |
isEmpty()
Deprecated. |
Iterator |
iterator()
Deprecated. |
Object |
last()
Deprecated. |
void |
prepend(Object o)
Deprecated. Prepends o to the end of this ordered set, or
moves it to the beginning if it already exists in the set. |
boolean |
remove(Object o)
Deprecated. |
boolean |
removeAll(Collection c)
Deprecated. |
Object |
removeFirst()
Deprecated. |
Object |
removeLast()
Deprecated. |
boolean |
retainAll(Collection c)
Deprecated. |
int |
size()
Deprecated. |
Object[] |
toArray()
Deprecated. |
Object[] |
toArray(Object[] a)
Deprecated. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
protected HashMap elementMap
Entry objects in the underlying
linked list. Provides speedy access to random objects in the
list.protected SimpleLinkedList list
| Constructor Detail |
public OrderedSet()
HashMap used for random element access.public OrderedSet(int initialCapacity)
HashMap used for random element access.
public OrderedSet(int initialCapacity,
float loadFactor)
HashMap used for random element
access.| Method Detail |
public void prepend(Object o)
o to the end of this ordered set, or
moves it to the beginning if it already exists in the set.public void append(Object o)
o to the end of this ordered set, or
moves it to the end if it already exists in the set.public Object removeFirst()
public Object removeLast()
public SimpleLinkedList.Entry getEntry(Object o)
public Object first()
public Object last()
public int size()
size in interface Setpublic boolean isEmpty()
isEmpty in interface Setpublic boolean contains(Object o)
contains in interface Setpublic Iterator iterator()
iterator in interface Setpublic Object[] toArray()
toArray in interface Setpublic Object[] toArray(Object[] a)
toArray in interface Setpublic boolean add(Object o)
o to the end of this ordered set. If
o is already in this set, does nothing. This
differs from the behavior of append(java.lang.Object).add in interface Setpublic boolean remove(Object o)
remove in interface Setpublic boolean containsAll(Collection c)
containsAll in interface Setpublic boolean addAll(Collection c)
addAll in interface Setpublic boolean retainAll(Collection c)
retainAll in interface Setpublic boolean removeAll(Collection c)
removeAll in interface Setpublic void clear()
clear in interface Setpublic boolean equals(Object ob)
equals in interface Setequals in class Objectpublic int hashCode()
hashCode in interface SethashCode in class Object
|
SolarMetric Kodo JDO 2.5.8 generated on January 11 2004 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||