Package gnu.lists
Class Sequences
java.lang.Object
gnu.lists.Sequences
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Iterator subclass to iterate of CharSequences. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic GVector
static GVector
asGVectorOrNull
(Object value) static IntSequence
asIntSequenceOrNull
(Object value) static List
asSequenceOrNull
(Object value) static List
coerceToSequence
(Object value) static SimpleVector
copy
(SimpleVector base, int start, int end, boolean writable) static SimpleVector
copy
(List base, Range.IntRange range, boolean writable) static boolean
copyInPlaceIsSafe
(Object src, Object dst) static SimpleVector
copySimple
(SimpleVector base, int start, int end, boolean writable) Do a logical substring operation with sharing.static Object
static Object
static Object
static Iterator
getIterator
(Object object) Get an Iterator for a "sequence-like" object.static int
static List
indirectIndexed
(List lst, IntSequence indexes) static void
static Object
static void
static void
writeULong
(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
-