Interface UnixFSCircularBlockBuffer.View<ViewedT>
- Type Parameters:
ViewedT
-
- Enclosing class:
UnixFSCircularBlockBuffer
public static interface UnixFSCircularBlockBuffer.View<ViewedT>
Represents a view of the underlying
UnixFSCircularBlockBuffer
. Unless otherwise stated, all operations
which mutate this View, will also mutate the underling parent buffer.-
Method Summary
Modifier and TypeMethodDescriptiondefault <OtherT> UnixFSCircularBlockBuffer.View
<OtherT> Transforms this type ofUnixFSCircularBlockBuffer.View<UnixFSCircularBlockBuffer.View>
to an instance ofUnixFSCircularBlockBuffer.View<OtherT>
.get
(int index) Gets theUnixFSCircularBlockBuffer.Slice<ViewedT>
associated with the index provided that the index is valid and within the range of the circular block buffer.void
Increments the trailing value, evaluating eachUnixFSCircularBlockBuffer.Slice<ViewedT>
boolean
isEmpty()
Returns true if all space is available in the buffer.boolean
isFull()
Returns true if there is no space left in the buffer.Increments the leading and gets the next object in the view.reset()
Resets thisUnixFSCircularBlockBuffer.View<ViewedT>
.reverse()
Returns a stream view of the current valid elements contained in this buffer, in reverse order.int
size()
Returns the size of the block buffer.stream()
Returns a stream view of the current valid elements contained in this buffer.
-
Method Details
-
isEmpty
boolean isEmpty()Returns true if all space is available in the buffer.- Returns:
- true, if empty. false, otherwise
-
isFull
boolean isFull()Returns true if there is no space left in the buffer.- Returns:
- true if no space is left
-
size
int size()Returns the size of the block buffer.- Returns:
- the size
-
stream
Stream<UnixFSCircularBlockBuffer.Slice<ViewedT>> stream()Returns a stream view of the current valid elements contained in this buffer. -
reverse
Stream<UnixFSCircularBlockBuffer.Slice<ViewedT>> reverse()Returns a stream view of the current valid elements contained in this buffer, in reverse order. -
nextLeading
UnixFSCircularBlockBuffer.Slice<ViewedT> nextLeading()Increments the leading and gets the next object in the view.- Returns:
-
get
Gets theUnixFSCircularBlockBuffer.Slice<ViewedT>
associated with the index provided that the index is valid and within the range of the circular block buffer.- Parameters:
index
- the index- Returns:
- the
UnixFSCircularBlockBuffer.Slice<ViewedT>
-
reset
UnixFSCircularBlockBuffer.View<ViewedT> reset()Resets thisUnixFSCircularBlockBuffer.View<ViewedT>
.- Returns:
- this instance
-
incrementTrailingUntil
Increments the trailing value, evaluating eachUnixFSCircularBlockBuffer.Slice<ViewedT>
- Parameters:
predicate
-
-
flatMap
Transforms this type ofUnixFSCircularBlockBuffer.View<UnixFSCircularBlockBuffer.View>
to an instance ofUnixFSCircularBlockBuffer.View<OtherT>
.- Type Parameters:
OtherT
- the other type- Parameters:
transform
- the transform function to apply.- Returns:
- another
UnixFSCircularBlockBuffer.View<OtherT>
-