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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbytegetByte(int index) intgetInt(int index) longgetLong(int index) shortgetShort(int index) intindexOf(byte value, int startIndex, int endIndex) intindexOf(int value, int startIndex, int endIndex) intindexOf(long value, int startIndex, int endIndex) intindexOf(short value, int startIndex, int endIndex) intindexOfBinarySearch(byte value, int startIndex, int endIndex) Expects the buffer to be sorted in unsigned ascending order.intindexOfBinarySearch(int value, int startIndex, int endIndex) Expects the buffer to be sorted in unsigned ascending order.intindexOfBinarySearch(long value, int startIndex, int endIndex) Expects the buffer to be sorted in unsigned ascending order.intindexOfBinarySearch(short value, int startIndex, int endIndex) Expects the buffer to be sorted in unsigned ascending order.voidmoveIntoPlace(int index, int targetIndex) Moves the value to targetIndex, and shifts all values in between.intmoveIntoSortedPlace(int index) Returns the final index that the value was moved to.voidreadContents(DataSource input, int startIndex, int endIndex) byteset(int index, byte value) intset(int index, int value) longset(int index, long value) shortset(int index, short value) voidwriteContents(DataSink output, int startIndex, int endIndex) Methods inherited from class net.royalur.lut.buffer.IntValueBuffer
getDouble, getFloat, set, setMethods inherited from class net.royalur.lut.buffer.ValueBuffer
convertTo, getCapacity, getType, readContents, writeContents
-
Constructor Details
-
UInt16ValueBuffer
public UInt16ValueBuffer(int capacity)
-
-
Method Details
-
set
public long set(int index, long value) - Specified by:
setin classValueBuffer
-
set
public int set(int index, int value) - Specified by:
setin classValueBuffer
-
set
public short set(int index, short value) - Specified by:
setin classValueBuffer
-
set
public byte set(int index, byte value) - Specified by:
setin classValueBuffer
-
getLong
public long getLong(int index) - Specified by:
getLongin classValueBuffer
-
getInt
public int getInt(int index) - Specified by:
getIntin classValueBuffer
-
getShort
public short getShort(int index) - Specified by:
getShortin classValueBuffer
-
getByte
public byte getByte(int index) - Specified by:
getBytein classValueBuffer
-
indexOf
public int indexOf(long value, int startIndex, int endIndex) - Specified by:
indexOfin classIntValueBuffer
-
indexOf
public int indexOf(int value, int startIndex, int endIndex) - Specified by:
indexOfin classIntValueBuffer
-
indexOf
public int indexOf(short value, int startIndex, int endIndex) - Specified by:
indexOfin classIntValueBuffer
-
indexOf
public int indexOf(byte value, int startIndex, int endIndex) - Specified by:
indexOfin classIntValueBuffer
-
indexOfBinarySearch
public int indexOfBinarySearch(long value, int startIndex, int endIndex) Description copied from class:IntValueBufferExpects the buffer to be sorted in unsigned ascending order.- Specified by:
indexOfBinarySearchin classIntValueBuffer
-
indexOfBinarySearch
public int indexOfBinarySearch(int value, int startIndex, int endIndex) Description copied from class:IntValueBufferExpects the buffer to be sorted in unsigned ascending order.- Specified by:
indexOfBinarySearchin classIntValueBuffer
-
indexOfBinarySearch
public int indexOfBinarySearch(short value, int startIndex, int endIndex) Description copied from class:IntValueBufferExpects the buffer to be sorted in unsigned ascending order.- Specified by:
indexOfBinarySearchin classIntValueBuffer
-
indexOfBinarySearch
public int indexOfBinarySearch(byte value, int startIndex, int endIndex) Description copied from class:IntValueBufferExpects the buffer to be sorted in unsigned ascending order.- Specified by:
indexOfBinarySearchin classIntValueBuffer
-
moveIntoSortedPlace
public int moveIntoSortedPlace(int index) Description copied from class:IntValueBufferReturns the final index that the value was moved to.- Specified by:
moveIntoSortedPlacein classIntValueBuffer
-
moveIntoPlace
public void moveIntoPlace(int index, int targetIndex) Description copied from class:ValueBufferMoves the value to targetIndex, and shifts all values in between.- Specified by:
moveIntoPlacein classValueBuffer
-
writeContents
- Specified by:
writeContentsin classValueBuffer- Throws:
IOException
-
readContents
- Specified by:
readContentsin classValueBuffer- Throws:
IOException
-