| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private int | |
| private final Set |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public Iterator |
| lastId | back to summary |
|---|---|
| private int lastId | |
| lowestPriority | back to summary |
|---|---|
| private int lowestPriority | |
| set | back to summary |
|---|---|
| private final Set<E> set | |
| PrioritizedList | back to summary |
|---|---|
| public PrioritizedList() | |
| add | back to summary |
|---|---|
| public void add(Object item, int priority) | |
| iterator | back to summary |
|---|---|
| public Iterator | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final int | |
| pack-priv final int | |
| pack-priv final Object |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | compareTo(Object
the object to be compared. o)Implements java. |
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides java. |
| id | back to summary |
|---|---|
| pack-priv final int id | |
| priority | back to summary |
|---|---|
| pack-priv final int priority | |
| value | back to summary |
|---|---|
| pack-priv final Object value | |
| PrioritizedItem | back to summary |
|---|---|
| public PrioritizedItem(Object value, int priority, int id) | |
| compareTo | back to summary |
|---|---|
| public int compareTo(Object o) Implements java. Doc from java. Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object. The implementor must ensure The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.
| |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public Object | |
| public void | remove()
Overrides default java. |
| iterator | back to summary |
|---|---|
| private Iterator<E> iterator | |
| PrioritizedItemIterator | back to summary |
|---|---|
| public PrioritizedItemIterator(Iterator<E> iterator) | |
| hasNext | back to summary |
|---|---|
| public boolean hasNext() Implements java. Doc from java. Returns
| |
| next | back to summary |
|---|---|
| public Object next() Implements java. Doc from java. Returns the next element in the iteration.
| |
| remove | back to summary |
|---|---|
| public void remove() Overrides default java. Doc from java. Removes from the underlying collection the last element returned
by this iterator (optional operation). This method can be called
only once per call to The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method, unless an overriding class has specified a concurrent modification policy.
The behavior of an iterator is unspecified if this method is called
after a call to the | |