Package gnu.lists
Class Sequences
java.lang.Object
gnu.lists.Sequences
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classIterator subclass to iterate of CharSequences. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic GVectorstatic GVectorasGVectorOrNull(Object value) static IntSequenceasIntSequenceOrNull(Object value) static ListasSequenceOrNull(Object value) static ListcoerceToSequence(Object value) static SimpleVectorcopy(SimpleVector base, int start, int end, boolean writable) static SimpleVectorcopy(List base, Range.IntRange range, boolean writable) static booleancopyInPlaceIsSafe(Object src, Object dst) static SimpleVectorcopySimple(SimpleVector base, int start, int end, boolean writable) Do a logical substring operation with sharing.static Objectstatic Objectstatic Objectstatic IteratorgetIterator(Object object) Get an Iterator for a "sequence-like" object.static intstatic ListindirectIndexed(List lst, IntSequence indexes) static voidstatic Objectstatic voidstatic voidwriteULong(long value, Consumer out)
-
Constructor Details
-
Sequences
public Sequences()
-
-
Method Details
-
asGVectorOrNull
-
asGVector
-
asSequenceOrNull
-
asIntSequenceOrNull
-
coerceToSequence
-
getAt
-
getSize
-
getIterator
Get an Iterator for a "sequence-like" object. This handles Iterables, CharSequences, and Java arrays. A CharSequences is treated as a sequence of (20-bit) code-points, not 16-bit char values. -
subList
-
indirectIndexed
-
drop
-
drop
-
copySimple
Do a logical substring operation with sharing. Requires base.isVerySimple() || base.isSubRange(). Note also that if base is an FString, the indexes count 16-bit code units. -
copy
-
copy
-
copyInPlaceIsSafe
-
replace
-
writeUInt
-
writeULong
-