T
- public interface Sequence<T> extends SequenceKernel<T>, java.lang.Iterable<T>
SequenceKernel
interface. All method implementations must, by design,
use only the SequenceKernel methods to perform operations on the component.Modifier and Type | Method and Description |
---|---|
void |
append(Sequence<T> seq)
Appends the entries in
seq to the end of this . |
void |
append(T entry)
Appends
entry to the end of this . |
boolean |
contains(T entry)
Reports whether
entry is in this . |
T |
entry(int pos)
Returns a reference to the entry at index
pos of this . |
T |
replaceEntry(int pos,
T entry)
Replaces the entry at index
pos of #this with
entry . |
add, length, remove
clear, newInstance, transferFrom
void append(Sequence<T> seq)
seq
to the end of this
.seq
- sequence whose entries will be appended to thisvoid append(T entry)
entry
to the end of this
.entry
- entry to be appended to this
T entry(int pos)
pos
of this
.pos
- index positionpos
of this
pos
of this
]T replaceEntry(int pos, T entry)
pos
of #this
with
entry
.pos
- index of entry in #this
to be replacedentry
- entry that will take the place of the entry at index
pos
of #this
pos
of #this
replaceEntry = [the entry at indexpos
of#this
] and [the entry at indexpos
of#this
is replaced withentry
]
boolean contains(T entry)
entry
is in this
.entry
- entry to be looked for