Class MaxLengthRangeSpecFunction (2.52.2)

public final class MaxLengthRangeSpecFunction extends RangeSpecFunction

Produce a new RangeSpec relative to the provided offset and prev, where the RangeSpec will have a maxLength set to the lesser of prev.maxLength and this.maxLength.

Instances of this class are immutable and thread safe.

Inheritance

Object > RangeSpecFunction > MaxLengthRangeSpecFunction

Methods

equals(Object o)

public boolean equals(Object o)
Parameter
Name Description
o Object
Returns
Type Description
boolean
Overrides

getMaxLength()

public long getMaxLength()

The maximum maxLength for any RangeSpec returned from #apply(long, RangeSpec)

Default: 0 -- no max length See Also: #withMaxLength(long), RangeSpec#maxLength()

Returns
Type Description
long

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

toString()

public String toString()
Returns
Type Description
String
Overrides

withMaxLength(long maxLength)

public MaxLengthRangeSpecFunction withMaxLength(long maxLength)

Return an instance with the maxLength set to the specified value.

Default: 0 -- no max length See Also: RangeSpec#maxLength(), #getMaxLength()

Parameter
Name Description
maxLength long

The number of bytes a RangeSpecs maxLength should be limited to. Must be > 0.

Returns
Type Description
MaxLengthRangeSpecFunction