Package org.antlr.v4.runtime
Class CodePointBuffer
- java.lang.Object
-
- org.antlr.v4.runtime.CodePointBuffer
-
public class CodePointBuffer extends java.lang.ObjectWrapper forByteBuffer/CharBuffer/IntBuffer. Because Java lacks generics on primitive types, these three types do not share an interface, so we have to write one manually.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCodePointBuffer.Builderstatic classCodePointBuffer.Type
-
Field Summary
Fields Modifier and Type Field Description private java.nio.ByteBufferbyteBufferprivate java.nio.CharBuffercharBufferprivate java.nio.IntBufferintBufferprivate CodePointBuffer.Typetype
-
Constructor Summary
Constructors Modifier Constructor Description privateCodePointBuffer(CodePointBuffer.Type type, java.nio.ByteBuffer byteBuffer, java.nio.CharBuffer charBuffer, java.nio.IntBuffer intBuffer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) intarrayOffset()static CodePointBuffer.Builderbuilder(int initialBufferSize)(package private) byte[]byteArray()(package private) char[]charArray()intget(int offset)(package private) CodePointBuffer.TypegetType()(package private) int[]intArray()intposition()voidposition(int newPosition)intremaining()static CodePointBufferwithBytes(java.nio.ByteBuffer byteBuffer)static CodePointBufferwithChars(java.nio.CharBuffer charBuffer)static CodePointBufferwithInts(java.nio.IntBuffer intBuffer)
-
-
-
Field Detail
-
type
private final CodePointBuffer.Type type
-
byteBuffer
private final java.nio.ByteBuffer byteBuffer
-
charBuffer
private final java.nio.CharBuffer charBuffer
-
intBuffer
private final java.nio.IntBuffer intBuffer
-
-
Constructor Detail
-
CodePointBuffer
private CodePointBuffer(CodePointBuffer.Type type, java.nio.ByteBuffer byteBuffer, java.nio.CharBuffer charBuffer, java.nio.IntBuffer intBuffer)
-
-
Method Detail
-
withBytes
public static CodePointBuffer withBytes(java.nio.ByteBuffer byteBuffer)
-
withChars
public static CodePointBuffer withChars(java.nio.CharBuffer charBuffer)
-
withInts
public static CodePointBuffer withInts(java.nio.IntBuffer intBuffer)
-
position
public int position()
-
position
public void position(int newPosition)
-
remaining
public int remaining()
-
get
public int get(int offset)
-
getType
CodePointBuffer.Type getType()
-
arrayOffset
int arrayOffset()
-
byteArray
byte[] byteArray()
-
charArray
char[] charArray()
-
intArray
int[] intArray()
-
builder
public static CodePointBuffer.Builder builder(int initialBufferSize)
-
-