structure
Class AbstractLinear

java.lang.Object
  extended by structure.AbstractStructure
      extended by structure.AbstractLinear
All Implemented Interfaces:
Linear, Structure
Direct Known Subclasses:
AbstractQueue, AbstractStack

public abstract class AbstractLinear
extends AbstractStructure
implements Linear


Constructor Summary
AbstractLinear()
           
 
Method Summary
 boolean empty()
          Determine if there are elements within the linear.
 java.lang.Object remove(java.lang.Object o)
          Removes value from the linear structure.
 
Methods inherited from class structure.AbstractStructure
contains, elements, hashCode, isEmpty, values
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface structure.Linear
add, get, remove, size
 
Methods inherited from interface structure.Structure
clear, contains, elements, isEmpty, iterator, values
 

Constructor Detail

AbstractLinear

public AbstractLinear()
Method Detail

empty

public boolean empty()
Determine if there are elements within the linear.

Specified by:
empty in interface Linear
Returns:
true if the linear structure is empty; false otherwise
Postcondition:
return true iff the linear structure is empty

remove

public java.lang.Object remove(java.lang.Object o)
Removes value from the linear structure. Not implemented (by default) for linear classes.

Specified by:
remove in interface Structure
Parameters:
value - value matching the value to be removed
Returns:
returns the value that was replaced, or null if none.
Precondition:
value is non-null
Postcondition:
value is removed from linear structure, if it was there