|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Linear
Linear classes are contains that have completely determined add and remove methods. Classic examples are stacks and queues.
Stack
,
Queue
Method Summary | |
---|---|
void |
add(java.lang.Object value)
Add a value to the structure. |
boolean |
empty()
Returns true iff the structure is empty. |
java.lang.Object |
get()
Preview the object to be removed. |
java.lang.Object |
remove()
Remove a value from the structure. |
int |
size()
Returns the number of elements in the linear structure. |
Methods inherited from interface structure.Structure |
---|
clear, contains, elements, isEmpty, iterator, remove, values |
Method Detail |
---|
void add(java.lang.Object value)
add
in interface Structure
value
- The value to be added to the structure.java.lang.Object get()
java.lang.Object remove()
int size()
size
in interface Structure
boolean empty()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |