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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract bytegetByte(int index) intabstract doublegetDouble(int index) abstract floatgetFloat(int index) abstract intgetInt(int index) abstract longgetLong(int index) abstract shortgetShort(int index) getType()abstract voidmoveIntoPlace(int index, int targetIndex) Moves the value to targetIndex, and shifts all values in between.voidreadContents(DataSource input) abstract voidreadContents(DataSource input, int startIndex, int endIndex) abstract byteset(int index, byte value) abstract doubleset(int index, double value) abstract floatset(int index, float value) abstract intset(int index, int value) abstract longset(int index, long value) abstract shortset(int index, short value) voidwriteContents(DataSink output) abstract voidwriteContents(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
-
convertTo
-