Public Member Functions | |
void | addAllElements (ArrayList v) |
void | addElement (MSortedElementInterface element) |
Iterator | elements () |
Iterator | elementsInverse () |
ArrayList | elementsVector () |
ArrayList | elementsVectorInverse () |
MSortedCollection () | |
void | removeAllElements () |
void | removeElement (MSortedElementInterface element) |
int | size () |
Protected Attributes | |
int | elementCount = 0 |
MSortedCollectionNode | topNode = null |
This class implements a sorted collection allowing to add and remove object. Every object has to implement a method greater.
Definition at line 38 of file MSortedCollection.java.
utils.MSortedCollection.MSortedCollection | ( | ) | [inline] |
This method creates a new instance.
Definition at line 46 of file MSortedCollection.java.
void utils.MSortedCollection.addAllElements | ( | ArrayList | v | ) | [inline] |
This method adds a vector of elements to the collection.
element,a | sorted collection element. |
Definition at line 61 of file MSortedCollection.java.
void utils.MSortedCollection.addElement | ( | MSortedElementInterface | element | ) | [inline] |
This method adds a new element to the collection.
element,a | sorted collection element. |
Definition at line 53 of file MSortedCollection.java.
Iterator utils.MSortedCollection.elements | ( | ) | [inline] |
This method is for returning an enumeration of elements.
Definition at line 92 of file MSortedCollection.java.
Iterator utils.MSortedCollection.elementsInverse | ( | ) | [inline] |
This method is for returning an enumeration of elements in inverse order.
Definition at line 104 of file MSortedCollection.java.
ArrayList utils.MSortedCollection.elementsVector | ( | ) | [inline] |
Definition at line 96 of file MSortedCollection.java.
ArrayList utils.MSortedCollection.elementsVectorInverse | ( | ) | [inline] |
Definition at line 108 of file MSortedCollection.java.
void utils.MSortedCollection.removeAllElements | ( | ) | [inline] |
This method removes all elements from self.
Definition at line 77 of file MSortedCollection.java.
void utils.MSortedCollection.removeElement | ( | MSortedElementInterface | element | ) | [inline] |
This method removes the given element from the collection.
element,a | sorted collection element. |
Definition at line 72 of file MSortedCollection.java.
int utils.MSortedCollection.size | ( | ) | [inline] |
This method answers the number of elements stored in self.
Definition at line 85 of file MSortedCollection.java.
int utils.MSortedCollection.elementCount = 0 [protected] |
Definition at line 40 of file MSortedCollection.java.
MSortedCollectionNode utils.MSortedCollection.topNode = null [protected] |
Definition at line 41 of file MSortedCollection.java.