|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object structure.AbstractStructure structure.OrderedVector
public class OrderedVector
Implementation of an ordered structure implemented using a vector
Vector
Constructor Summary | |
---|---|
OrderedVector()
Construct an empty ordered vector |
Method Summary | |
---|---|
void |
add(Object value)
Add a comparable value to an ordered vector |
void |
clear()
Removes all the values from a an ordered vector |
boolean |
contains(Object value)
Determine if a comparable value is a member of the ordered vector |
boolean |
isEmpty()
Determine if the ordered vector is empty. |
Iterator |
iterator()
Construct an iterator to traverse the ordered vector in ascending order |
Object |
remove(Object value)
Remove a comparable value from an ordered vector At most one value is removed |
int |
size()
Determine the number of elements within the ordered vector |
String |
toString()
Construct a string representation of an ordered vector |
Methods inherited from class structure.AbstractStructure |
---|
elements, hashCode, values |
Methods inherited from class java.lang.Object |
---|
equals, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface structure.Structure |
---|
elements, values |
Constructor Detail |
---|
public OrderedVector()
Method Detail |
---|
public void add(Object value)
add
in interface Structure
value
- The comparable value to be added to the ordered vectorpublic boolean contains(Object value)
contains
in interface Structure
contains
in class AbstractStructure
value
- The comparable value sought
public Object remove(Object value)
remove
in interface Structure
value
- The comparable value to be removed
public boolean isEmpty()
isEmpty
in interface Structure
isEmpty
in class AbstractStructure
public void clear()
clear
in interface Structure
public int size()
size
in interface Structure
public Iterator iterator()
iterator
in interface Structure
AbstractIterator
,
Iterator
,
Enumeration
,
Structure.elements()
public String toString()
toString
in class Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |