Class UnixFSCircularBlockBuffer.Slice<T>
java.lang.Object
dev.getelements.elements.rt.transact.unix.UnixFSCircularBlockBuffer.Slice<T>
- Enclosing class:
UnixFSCircularBlockBuffer
Represents a slice of the provided byte buffer array. Two
UnixFSCircularBlockBuffer.Slice<T>
instances are equal if they both
point to the same index in the UnixFSCircularBlockBuffer
, as they essentially point to the same data.
This may be a little counterintuitive as two UnixFSCircularBlockBuffer.Slice<T>
instances of differing generic types may be the
same even if they house different values.-
Method Summary
Modifier and TypeMethodDescriptionclear()
Clears the contents of the slice by filling the underlying memory with the filler bytes.boolean
int
getIndex()
Gets the index in the circular block buffer of theUnixFSCircularBlockBuffer.Slice<T>
.int
hashCode()
Flat maps thisUnixFSCircularBlockBuffer.Slice<T>
by applying the supplied mapper, and returning a new instance of
-
Method Details
-
getIndex
public int getIndex()Gets the index in the circular block buffer of theUnixFSCircularBlockBuffer.Slice<T>
.- Returns:
- the index
-
clear
Clears the contents of the slice by filling the underlying memory with the filler bytes. -
equals
-
hashCode
public int hashCode() -
map
Flat maps thisUnixFSCircularBlockBuffer.Slice<T>
by applying the supplied mapper, and returning a new instance of- Type Parameters:
U
- the desired type- Parameters:
mapper
- the mapper function- Returns:
- a new
UnixFSCircularBlockBuffer.Slice<U>
which was derived from the original value
-