Package components.sequence
Class SequenceSecondary<T>
java.lang.Object
components.sequence.SequenceSecondary<T>
- Type Parameters:
T
- type ofSequence
entries
- All Implemented Interfaces:
Sequence<T>
,SequenceKernel<T>
,Standard<Sequence<T>>
,Iterable<T>
- Direct Known Subclasses:
Sequence1L
,Sequence2L
,Sequence3
Layered implementations of secondary methods for
Sequence
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Concatenates ("appends")s
to the end ofthis
.entry
(int pos) Reports the entry at positionpos
ofthis
.final boolean
void
Removes the substring ofthis
starting at positionpos1
and ending at positionpos2-1
and puts in its
.void
flip()
Reverses ("flips")this
.int
hashCode()
void
Insertss
intothis
at positionpos
, i.e., after thepos
-th entry ofthis
; and clearss
.replaceEntry
(int pos, T x) Replaces the entry at positionpos
ofthis
with the entryx
and returns the old entry at that position.toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
Methods inherited from interface components.sequence.SequenceKernel
add, length, remove
Methods inherited from interface components.standard.Standard
clear, newInstance, transferFrom
-
Constructor Details
-
SequenceSecondary
public SequenceSecondary()
-
-
Method Details
-
equals
-
hashCode
-
toString
-
entry
Description copied from interface:Sequence
Reports the entry at positionpos
ofthis
. -
replaceEntry
Description copied from interface:Sequence
Replaces the entry at positionpos
ofthis
with the entryx
and returns the old entry at that position.- Specified by:
replaceEntry
in interfaceSequence<T>
- Parameters:
pos
- the position at which to replace an entryx
- the entry replacing the old one- Returns:
- the old entry at that position
-
append
Description copied from interface:Sequence
Concatenates ("appends")s
to the end ofthis
. -
flip
Description copied from interface:Sequence
Reverses ("flips")this
. -
insert
Description copied from interface:Sequence
Insertss
intothis
at positionpos
, i.e., after thepos
-th entry ofthis
; and clearss
. -
extract
Description copied from interface:Sequence
Removes the substring ofthis
starting at positionpos1
and ending at positionpos2-1
and puts in its
.
-