|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectstructure.AbstractStructure<ELTTYPE>
public abstract class AbstractStructure<ELTTYPE>
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(ELTTYPE 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<ELTTYPE> |
values()
Returns a java.util.Collection wrapping this structure. |
| Methods inherited from class java.lang.Object |
|---|
equals, 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 Structure<ELTTYPE>public java.util.Enumeration elements()
elements in interface Structure<ELTTYPE>AbstractIterator,
Iterator,
Enumerationstructure package implementations return
an AbstractIteratorpublic boolean contains(ELTTYPE value)
contains in interface Structure<ELTTYPE>value - non-null value to be found within structure
public int hashCode()
hashCode in class java.lang.Objectpublic java.util.Collection<ELTTYPE> values()
StructCollection
whose methods may not provide the most efficent implementations
of non-Structure Collection methods.
values in interface Structure<ELTTYPE>StructCollection,
CollectionCollection 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 | |||||||