|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Interface for a ranked sequence.
A ranked sequence is a collection of linearly arranged elements that are accessed, inserted, and removed by their rank. The rank of an element is the number of elements preceding it, that is, in a ranked sequence with n elements, the first element has rank 0, the second element has rank 1, ..., the last element has rank n-1.
BoundaryViolationException,
Container,
Sequence,
PositionalSequence| Method Summary | |
java.lang.Object |
elemAtRank(int rank)
Inspect the element at a specified rank. |
void |
insertElemAtRank(int rank,
java.lang.Object element)
Insert an element at a specified rank. |
java.lang.Object |
removeElemAtRank(int rank)
Remove the element at a specified rank. |
java.lang.Object |
replaceElemAtRank(int rank,
java.lang.Object newElement)
Replace the element at a specified rank. |
| Methods inherited from interface jdsl.simple.api.SimpleContainer |
isEmpty,
size |
| Method Detail |
public java.lang.Object elemAtRank(int rank)
throws BoundaryViolationException
rank - rank of the element to be inspected.rank is
not between 0 and size()-1.
public java.lang.Object replaceElemAtRank(int rank,
java.lang.Object newElement)
throws BoundaryViolationException
rank - rank of the element to be replaced.newElement - new element at the specified rank.
public void insertElemAtRank(int rank,
java.lang.Object element)
throws BoundaryViolationException
rank - rank at which the new element should be inserted.element - element to be inserted.
public java.lang.Object removeElemAtRank(int rank)
throws BoundaryViolationException
rank - rank of the element to be removed.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||