Package net.royalur.lut.buffer
Class IntValueBuffer
java.lang.Object
net.royalur.lut.buffer.ValueBuffer
net.royalur.lut.buffer.IntValueBuffer
- Direct Known Subclasses:
UInt16ValueBuffer
,UInt32ValueBuffer
,UInt64ValueBuffer
,UInt8ValueBuffer
Stores binary values and provides efficient methods to manipulate it.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
getDouble
(int index) float
getFloat
(int index) abstract int
indexOf
(byte value, int startIndex, int endIndex) abstract int
indexOf
(int value, int startIndex, int endIndex) abstract int
indexOf
(long value, int startIndex, int endIndex) abstract int
indexOf
(short value, int startIndex, int endIndex) abstract int
indexOfBinarySearch
(byte value, int startIndex, int endIndex) Expects the buffer to be sorted in unsigned ascending order.abstract int
indexOfBinarySearch
(int value, int startIndex, int endIndex) Expects the buffer to be sorted in unsigned ascending order.abstract int
indexOfBinarySearch
(long value, int startIndex, int endIndex) Expects the buffer to be sorted in unsigned ascending order.abstract int
indexOfBinarySearch
(short value, int startIndex, int endIndex) Expects the buffer to be sorted in unsigned ascending order.abstract int
moveIntoSortedPlace
(int index) Returns the final index that the value was moved to.double
set
(int index, double value) float
set
(int index, float value) Methods inherited from class net.royalur.lut.buffer.ValueBuffer
getByte, getCapacity, getInt, getLong, getShort, getType, moveIntoPlace, readContents, readContents, set, set, set, set, writeContents, writeContents
-
Constructor Details
-
IntValueBuffer
-
-
Method Details
-
set
public double set(int index, double value) - Specified by:
set
in classValueBuffer
-
set
public float set(int index, float value) - Specified by:
set
in classValueBuffer
-
getDouble
public double getDouble(int index) - Specified by:
getDouble
in classValueBuffer
-
getFloat
public float getFloat(int index) - Specified by:
getFloat
in classValueBuffer
-
indexOf
public abstract int indexOf(long value, int startIndex, int endIndex) -
indexOf
public abstract int indexOf(int value, int startIndex, int endIndex) -
indexOf
public abstract int indexOf(short value, int startIndex, int endIndex) -
indexOf
public abstract int indexOf(byte value, int startIndex, int endIndex) -
indexOfBinarySearch
public abstract int indexOfBinarySearch(long value, int startIndex, int endIndex) Expects the buffer to be sorted in unsigned ascending order. -
indexOfBinarySearch
public abstract int indexOfBinarySearch(int value, int startIndex, int endIndex) Expects the buffer to be sorted in unsigned ascending order. -
indexOfBinarySearch
public abstract int indexOfBinarySearch(short value, int startIndex, int endIndex) Expects the buffer to be sorted in unsigned ascending order. -
indexOfBinarySearch
public abstract int indexOfBinarySearch(byte value, int startIndex, int endIndex) Expects the buffer to be sorted in unsigned ascending order. -
moveIntoSortedPlace
public abstract int moveIntoSortedPlace(int index) Returns the final index that the value was moved to.
-