|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--structure.AbstractStructure
An abstract implementation of a basic, mutable data structure.
This abstract implementation of the Structure interface
provides a good starting point for the implementation of a basic,
mutable data structure. This implementation provides a workable
implementation of isEmpty, contains, and
values.
Where more efficient implementations are possible, the user may wish
to override these methods. For example, an implementor may have
a structure directly implement the java.util.Collection
interface and have the value method simply return
this. Because of peculiarities of both systems of
designing data structures, it is often best to avoid direct implementation
java.util.Collection and Structure in one class.
| Constructor Summary | |
AbstractStructure()
The default constructor. |
|
| Method Summary | |
boolean |
contains(java.lang.Object value)
Determines if the structure contains a value. |
java.util.Enumeration |
elements()
Return an enumeration associated with this structure. |
int |
hashCode()
|
boolean |
isEmpty()
Determine if there are elements within the structure. |
java.util.Collection |
values()
Returns a java.util.Collection wrapping this structure. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface structure.Structure |
add, clear, iterator, remove, size |
| Constructor Detail |
public AbstractStructure()
| Method Detail |
public boolean isEmpty()
isEmpty in interface Structurepublic java.util.Enumeration elements()
elements in interface StructureAbstractIterator,
Iterator,
Enumerationpublic boolean contains(java.lang.Object value)
contains in interface Structurevalue - non-null value to be found within structure
public int hashCode()
hashCode in class java.lang.Objectpublic java.util.Collection values()
StructCollection
whose methods may not provide the most efficent implementations
of non-Structure Collection methods.
values in interface StructureStructCollection,
Collection
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||