Interface BuildableBytesOptionalFunction<T>
- All Superinterfaces:
BuildableOptionalFunction<T,
,byte[]> Function<T,
Optional<byte[]>>
Optional<byte[]>
result, and
supports building derived functional types.-
Method Summary
Modifier and TypeMethodDescriptiondefault BuildableBytesOptionalFunction<T>
head
(int length) Returns a function that maps the head of the extracted byte array.default BuildableComparableOptionalFunction<T,
Integer> length()
Returns a function that maps the length of the extracted byte array.default BuildableBytesOptionalFunction<T>
range
(int start, int end) Returns a function that maps a range of the extracted byte array.default BuildableBytesOptionalFunction<T>
tail
(int length) Returns a function that maps the tail of the extracted byte array.Methods inherited from interface com.terracottatech.store.function.BuildableOptionalFunction
in, in, is
-
Method Details
-
length
Returns a function that maps the length of the extracted byte array.- Returns:
- a byte array length function
-
range
Returns a function that maps a range of the extracted byte array.If the requested range is provably out-of-bounds or otherwise invalid then an
IllegalArgumentException
will be thrown by this method. If the requested range is found to be out-of-bounds at evaluation time then the returned function will throwIndexOutOfBoundsException
.- Parameters:
start
- inclusive range startend
- exclusive range end- Returns:
- a range reading function
- Throws:
IllegalArgumentException
- if the selected range is provably out-of-bounds or otherwise invalid
-
head
Returns a function that maps the head of the extracted byte array.If the requested length is negative then an
IllegalArgumentException
will be thrown by this method. If the requested length is found to be out-of-bounds at evaluation time then the returned function will throwIndexOutOfBoundsException
.- Parameters:
length
- head length- Returns:
- a head reading function
- Throws:
IllegalArgumentException
- if the length is negative
-
tail
Returns a function that maps the tail of the extracted byte array.If the requested length is negative then an
IllegalArgumentException
will be thrown by this method. If the requested length is found to be out-of-bounds at evaluation time then the returned function will throwIndexOutOfBoundsException
.- Parameters:
length
- tail length- Returns:
- a tail reading function
- Throws:
IllegalArgumentException
- if the length is negative
-