|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractSet<E>
java.util.TreeSet<E>
org.mozdev.MacroTracker.toolkit.DataStructure.SuperSet<E>
public class SuperSet<E>
A TreeSet with a efficient get(int) function.
This is useful if you want to have items in a data structure sorted but at the same time being able to get an object from the middle.
Constructor Summary | |
---|---|
SuperSet()
|
Method Summary | |
---|---|
boolean |
add(E o)
|
E |
get(int index)
Returns an item from the SuperSet. (precondition: 0 =< index =< size()) |
boolean |
remove(java.lang.Object o)
|
int |
size()
|
java.lang.Object[] |
toArray()
|
Methods inherited from class java.util.TreeSet |
---|
addAll, clear, clone, comparator, contains, first, headSet, isEmpty, iterator, last, subSet, tailSet |
Methods inherited from class java.util.AbstractSet |
---|
equals, hashCode, removeAll |
Methods inherited from class java.util.AbstractCollection |
---|
containsAll, retainAll, toArray, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Set |
---|
containsAll, equals, hashCode, removeAll, retainAll, toArray |
Constructor Detail |
---|
public SuperSet()
Method Detail |
---|
public boolean add(E o)
add
in interface java.util.Collection<E>
add
in interface java.util.Set<E>
add
in class java.util.TreeSet<E>
public boolean remove(java.lang.Object o)
remove
in interface java.util.Collection<E>
remove
in interface java.util.Set<E>
remove
in class java.util.TreeSet<E>
public E get(int index)
index
- The index item of the number in the set you want to return.public int size()
size
in interface java.util.Collection<E>
size
in interface java.util.Set<E>
size
in class java.util.TreeSet<E>
public java.lang.Object[] toArray()
toArray
in interface java.util.Collection<E>
toArray
in interface java.util.Set<E>
toArray
in class java.util.AbstractCollection<E>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |