Package dev.cel.common.internal
Class CelCodePointArray
- java.lang.Object
-
- dev.cel.common.internal.CelCodePointArray
-
- Direct Known Subclasses:
BasicCodePointArray,Latin1CodePointArray,SupplementalCodePointArray
@Immutable @Internal public abstract class CelCodePointArray extends java.lang.Object
Represents an in-memory read-only contiguous source of Unicode code points.CEL Library Internals. Do Not Use.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static CelCodePointArrayfromString(java.lang.String text)abstract intget(int index)Get the code point at the given index.booleanisEmpty()Returns true if empty, false otherwise.intlength()abstract com.google.common.collect.ImmutableList<java.lang.Integer>lineOffsets()Returns the line offsets.abstract intsize()Returns the number of code points.abstract CelCodePointArrayslice(int i, int j)Returns a newCelCodePointArraythat is a subview of this between [i, j).abstract java.lang.StringtoString()
-
-
-
Method Detail
-
slice
public abstract CelCodePointArray slice(int i, int j)
Returns a newCelCodePointArraythat is a subview of this between [i, j).
-
get
public abstract int get(int index)
Get the code point at the given index.
-
size
public abstract int size()
Returns the number of code points.
-
lineOffsets
public abstract com.google.common.collect.ImmutableList<java.lang.Integer> lineOffsets()
Returns the line offsets.
-
length
public final int length()
-
isEmpty
public boolean isEmpty()
Returns true if empty, false otherwise.
-
toString
public abstract java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
fromString
public static CelCodePointArray fromString(java.lang.String text)
-
-