T
- public class SequenceDL<T> extends SequenceSecondary<T>
Constructor and Description |
---|
SequenceDL() |
Modifier and Type | Method and Description |
---|---|
void |
add(int pos,
T entry)
Inserts
entry into this at index position pos . |
void |
clear()
Resets
this to its initial value. |
java.util.Iterator<T> |
iterator() |
int |
length()
Reports the length of
this . |
Sequence<T> |
newInstance()
Returns a new object with the same dynamic type as
this , having
an initial value. |
T |
remove(int pos)
Removes the entry at
pos position of #this . |
void |
transferFrom(Sequence<T> source)
Sets
this to the incoming value of source, and resets
source to an initial value; the declaration notwithstanding, the
dynamic type of source must be the same as the dynamic type of
this . |
append, append, contains, entry, equals, hashCode, replaceEntry, toString
public void add(int pos, T entry)
SequenceKernel
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 insertedpublic T remove(int pos)
SequenceKernel
pos
position of #this
.pos
- index of the entry to be removedpos
of #this
public int length()
SequenceKernel
this
.public void clear()
Standard
this
to its initial value.public void transferFrom(Sequence<T> source)
Standard
this
to the incoming value of source, and resets
source
to an initial value; the declaration notwithstanding, the
dynamic type of source
must be the same as the dynamic type of
this
. If the type T has a no-argument constructor, then
source
satisfies the contract of the no-argument constructor for
T. If T does not have a no-argument constructor, then source satisfies
the contract of the constructor call that was used to initialize
#source
.source
- object whose value is to be transferredpublic Sequence<T> newInstance()
Standard
this
, having
an initial value. If the type T has a no-argument constructor, then the
value of the new returned object satisfies the contract of the
no-argument constructor for T. If T does not have a no-argument
constructor, then the value of the new returned object satisfies the
contract of the constructor call that was used to initialize
this
.this
with an initial valuepublic java.util.Iterator<T> iterator()