Gets a 4-bit unsigned value from this array at an index specified. @param index the index @return the value, as a byte @since 1.0
(@IntRange(from = 0, to = MAXIMUM_INDEX) long index)
| 56 | * @since 1.0 |
| 57 | */ |
| 58 | public @IntRange(from = 0, to = MAX_VALUE) byte get(@IntRange(from = 0, to = MAXIMUM_INDEX) long index) { |
| 59 | byte actualArrayValue = this.packedArray[createdPackedArrayIndex(index)]; |
| 60 | byte bitShiftCount = createBitShiftCount(index); |
| 61 | return (byte) (actualArrayValue >>> bitShiftCount & MAX_VALUE); |
| 62 | } |
| 63 | |
| 64 | /** |
| 65 | * Creates a copy of this {@linkplain NibbleArray nibble array}, with a replaced value at an index specified |