Package net.royalur.lut.buffer
Class ValueBuffer
java.lang.Object
net.royalur.lut.buffer.ValueBuffer
- Direct Known Subclasses:
FloatValueBuffer
,IntValueBuffer
Stores binary values and provides efficient methods to manipulate it.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract byte
getByte
(int index) int
abstract double
getDouble
(int index) abstract float
getFloat
(int index) abstract int
getInt
(int index) abstract long
getLong
(int index) abstract short
getShort
(int index) getType()
abstract void
moveIntoPlace
(int index, int targetIndex) Moves the value to targetIndex, and shifts all values in between.void
readContents
(DataSource input) abstract void
readContents
(DataSource input, int startIndex, int endIndex) abstract byte
set
(int index, byte value) abstract double
set
(int index, double value) abstract float
set
(int index, float value) abstract int
set
(int index, int value) abstract long
set
(int index, long value) abstract short
set
(int index, short value) void
writeContents
(DataSink output) abstract void
writeContents
(DataSink output, int startIndex, int endIndex)
-
Constructor Details
-
ValueBuffer
-
-
Method Details
-
getType
-
getCapacity
public int getCapacity() -
set
public abstract long set(int index, long value) -
set
public abstract int set(int index, int value) -
set
public abstract short set(int index, short value) -
set
public abstract byte set(int index, byte value) -
set
public abstract double set(int index, double value) -
set
public abstract float set(int index, float value) -
getLong
public abstract long getLong(int index) -
getInt
public abstract int getInt(int index) -
getShort
public abstract short getShort(int index) -
getByte
public abstract byte getByte(int index) -
getDouble
public abstract double getDouble(int index) -
getFloat
public abstract float getFloat(int index) -
moveIntoPlace
public abstract void moveIntoPlace(int index, int targetIndex) Moves the value to targetIndex, and shifts all values in between. -
writeContents
public abstract void writeContents(DataSink output, int startIndex, int endIndex) throws IOException - Throws:
IOException
-
writeContents
- Throws:
IOException
-
readContents
public abstract void readContents(DataSource input, int startIndex, int endIndex) throws IOException - Throws:
IOException
-
readContents
- Throws:
IOException
-