T
- public interface SequenceKernel<T> extends Standard<Sequence<T>>
Sequence
kernel component containing method headers and contracts for
all methods that will directly interact with the label representations of all
Sequence implementations. All sub-interface methods should use only these
methods to perform operations on the Sequence
.Modifier and Type | Method and Description |
---|---|
void |
add(int pos,
T entry)
Inserts
entry into this at index position pos . |
int |
length()
Reports the length of
this . |
T |
remove(int pos)
Removes the entry at
pos position of #this . |
clear, newInstance, transferFrom
void add(int pos, T entry)
entry
into this
at index position pos
.
All entries following the insertion are shifted to the right.pos
- index of the insertionentry
- entry to be insertedentry
inserted at the pos
position}T remove(int pos)
pos
position of #this
.pos
- index of the entry to be removedpos
of #this
remove = [entry at indexpos
of#this
] and this = [#this without the entry at indexpos
] and [all entries following the removed entry shift to the left]
int length()
this
.