|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Structure
The interface of a basic, mutable data structure.
This interface is the basis for most mutable structures in the structure package. While most methods are easy implement, it is often sufficient to simply extend a basic, abstract implementation of this class, the AbstractStructure. The AbstractStructure implements the isEmpty, contains and collection methods. They may be overridden if a particularly efficient technique is to be preferred.
Method Summary | |
---|---|
void |
add(java.lang.Object value)
Inserts value in some structure-specific location. |
void |
clear()
Removes all elements from the structure. |
boolean |
contains(java.lang.Object value)
Determines if the structure contains a value. |
java.util.Enumeration |
elements()
Returns an enumeration for traversing the structure. |
boolean |
isEmpty()
Determine if there are elements within the structure. |
java.util.Iterator |
iterator()
Returns an iterator for traversing the structure. |
java.lang.Object |
remove(java.lang.Object value)
Removes a value from the structure. |
int |
size()
Determine the size of the structure. |
java.util.Collection |
values()
Returns a java.util.Collection wrapping this structure. |
Method Detail |
---|
int size()
boolean isEmpty()
void clear()
boolean contains(java.lang.Object value)
value
- non-null value to be found within structure
void add(java.lang.Object value)
value
- the value to be added to the structure; non-nulljava.lang.Object remove(java.lang.Object value)
value
- value matching the value to be removed
java.util.Enumeration elements()
AbstractIterator
,
Iterator
,
Enumeration
,
iterator()
structure
package implementations return
an AbstractIterator
java.util.Iterator iterator()
AbstractIterator
,
Iterator
,
Enumeration
,
elements()
structure
package implementations return
an AbstractIterator
java.util.Collection values()
Collection
that may be used with
Java's Collection Framework
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |