Class RangeSpecFunction (2.52.2)

public abstract class RangeSpecFunction

A specialized BiFunction to produce a RangeSpec given an offset and a possible previous RangeSpec.

Inheritance

java.lang.Object > RangeSpecFunction

Static Methods

linearExponential()

public static LinearExponentialRangeSpecFunction linearExponential()

Get the default instance of LinearExponentialRangeSpecFunction.

Returns
Type Description
LinearExponentialRangeSpecFunction

maxLength(long maxLength)

public static MaxLengthRangeSpecFunction maxLength(long maxLength)

Produce a new MaxLengthRangeSpecFunction where the maximum possible length of any returned RangeSpec is set to the lesser of prev.maxLength and this.maxLength.

Parameter
Name Description
maxLength long
Returns
Type Description
MaxLengthRangeSpecFunction

Methods

andThen(RangeSpecFunction then)

public RangeSpecFunction andThen(RangeSpecFunction then)

Returns a composed function that first applies this function to its input, and then applies the then function to the result.

Both functions will be called with the same offset.

The returned instance is equivalent to the following:

 then.apply(offset, this.apply(offset, prev))
 
Parameter
Name Description
then RangeSpecFunction
Returns
Type Description
RangeSpecFunction