|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--jdsl.core.ref.AbstractPositionalContainer
An abstract positional container that others may extend if they do not wish to deal with some of the more mundane aspects of positional containers and/or if they wish to avoid implementing themselves some of the methods of container that aren't terribly pertinent to a PositionalContainer. Feel free to override any of these methods in subclasses, but be certain that they work according to the API in jdsl.core.api. Also handles isEmpty() from InspectableContainer.
PositionalContainer| Constructor Summary | |
AbstractPositionalContainer()
|
|
| Method Summary | |
boolean |
isEmpty()
Checks if this container is empty. |
void |
swapElements(Position a,
Position b)
Works on top of PositionalContainer method replaceElement(Position, Object) and InspectableContainer method contains(). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface jdsl.core.api.InspectablePositionalContainer |
positions |
| Methods inherited from interface jdsl.core.api.InspectableContainer |
contains, elements, size |
| Methods inherited from interface jdsl.core.api.Container |
newContainer, replaceElement |
| Constructor Detail |
public AbstractPositionalContainer()
| Method Detail |
public void swapElements(Position a,
Position b)
throws InvalidAccessorException
swapElements in interface PositionalContainerjdsl.core.api.PositionalContainera - First Position to swapb - Second Position to swapInvalidAccessorException - if either of a
and b is null or does not belong to this positional
containerpublic boolean isEmpty()
isEmpty in interface InspectableContainerjdsl.core.api.InspectableContainertrue if and only if the container is empty (holds
no elements)InspectableBinaryTree
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||