Package net.royalur.lut.buffer
Class UInt16ValueBuffer
java.lang.Object
net.royalur.lut.buffer.ValueBuffer
net.royalur.lut.buffer.IntValueBuffer
net.royalur.lut.buffer.UInt16ValueBuffer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbyte
getByte
(int index) int
getInt
(int index) long
getLong
(int index) short
getShort
(int index) int
indexOf
(byte value, int startIndex, int endIndex) int
indexOf
(int value, int startIndex, int endIndex) int
indexOf
(long value, int startIndex, int endIndex) int
indexOf
(short value, int startIndex, int endIndex) int
indexOfBinarySearch
(byte value, int startIndex, int endIndex) Expects the buffer to be sorted in unsigned ascending order.int
indexOfBinarySearch
(int value, int startIndex, int endIndex) Expects the buffer to be sorted in unsigned ascending order.int
indexOfBinarySearch
(long value, int startIndex, int endIndex) Expects the buffer to be sorted in unsigned ascending order.int
indexOfBinarySearch
(short value, int startIndex, int endIndex) Expects the buffer to be sorted in unsigned ascending order.void
moveIntoPlace
(int index, int targetIndex) Moves the value to targetIndex, and shifts all values in between.int
moveIntoSortedPlace
(int index) Returns the final index that the value was moved to.void
readContents
(DataSource input, int startIndex, int endIndex) byte
set
(int index, byte value) int
set
(int index, int value) long
set
(int index, long value) short
set
(int index, short value) void
writeContents
(DataSink output, int startIndex, int endIndex) Methods inherited from class net.royalur.lut.buffer.IntValueBuffer
getDouble, getFloat, set, set
Methods inherited from class net.royalur.lut.buffer.ValueBuffer
getCapacity, getType, readContents, writeContents
-
Constructor Details
-
UInt16ValueBuffer
public UInt16ValueBuffer(int capacity)
-
-
Method Details
-
set
public long set(int index, long value) - Specified by:
set
in classValueBuffer
-
set
public int set(int index, int value) - Specified by:
set
in classValueBuffer
-
set
public short set(int index, short value) - Specified by:
set
in classValueBuffer
-
set
public byte set(int index, byte value) - Specified by:
set
in classValueBuffer
-
getLong
public long getLong(int index) - Specified by:
getLong
in classValueBuffer
-
getInt
public int getInt(int index) - Specified by:
getInt
in classValueBuffer
-
getShort
public short getShort(int index) - Specified by:
getShort
in classValueBuffer
-
getByte
public byte getByte(int index) - Specified by:
getByte
in classValueBuffer
-
indexOf
public int indexOf(long value, int startIndex, int endIndex) - Specified by:
indexOf
in classIntValueBuffer
-
indexOf
public int indexOf(int value, int startIndex, int endIndex) - Specified by:
indexOf
in classIntValueBuffer
-
indexOf
public int indexOf(short value, int startIndex, int endIndex) - Specified by:
indexOf
in classIntValueBuffer
-
indexOf
public int indexOf(byte value, int startIndex, int endIndex) - Specified by:
indexOf
in classIntValueBuffer
-
indexOfBinarySearch
public int indexOfBinarySearch(long value, int startIndex, int endIndex) Description copied from class:IntValueBuffer
Expects the buffer to be sorted in unsigned ascending order.- Specified by:
indexOfBinarySearch
in classIntValueBuffer
-
indexOfBinarySearch
public int indexOfBinarySearch(int value, int startIndex, int endIndex) Description copied from class:IntValueBuffer
Expects the buffer to be sorted in unsigned ascending order.- Specified by:
indexOfBinarySearch
in classIntValueBuffer
-
indexOfBinarySearch
public int indexOfBinarySearch(short value, int startIndex, int endIndex) Description copied from class:IntValueBuffer
Expects the buffer to be sorted in unsigned ascending order.- Specified by:
indexOfBinarySearch
in classIntValueBuffer
-
indexOfBinarySearch
public int indexOfBinarySearch(byte value, int startIndex, int endIndex) Description copied from class:IntValueBuffer
Expects the buffer to be sorted in unsigned ascending order.- Specified by:
indexOfBinarySearch
in classIntValueBuffer
-
moveIntoSortedPlace
public int moveIntoSortedPlace(int index) Description copied from class:IntValueBuffer
Returns the final index that the value was moved to.- Specified by:
moveIntoSortedPlace
in classIntValueBuffer
-
moveIntoPlace
public void moveIntoPlace(int index, int targetIndex) Description copied from class:ValueBuffer
Moves the value to targetIndex, and shifts all values in between.- Specified by:
moveIntoPlace
in classValueBuffer
-
writeContents
- Specified by:
writeContents
in classValueBuffer
- Throws:
IOException
-
readContents
- Specified by:
readContents
in classValueBuffer
- Throws:
IOException
-