NumberOrRange

public final class NumberOrRange(source)

Represents an integer, or a start- and stop-inclusive integer range.

Parameters

start

The inclusive lower bound of the range or null, if this is a number

end

The inclusive upper bound of the range or null, if not specified or this is a number

value

The integer value or null, if this is a range

Functions

Link copied to clipboard
public final Integer getEnd()
Link copied to clipboard
public final Integer getStart()
Link copied to clipboard
public final Integer getValue()
Link copied to clipboard
public final Boolean isNumber()

Whether this object represents an integer.

Link copied to clipboard
public final Boolean isRange()

Whether this object represents a range.

Link copied to clipboard
public final Filter<Integer, Unit> toFilter()

Converts the current object to a filter.

Link copied to clipboard
public final static NumberOrRange tryParse(String numberRange)

Parses a number or range according to the OptiGUI docs.

Properties

Link copied to clipboard
private final Integer end
Link copied to clipboard
private final Boolean isNumber

Whether this object represents an integer.

Link copied to clipboard
private final Boolean isRange

Whether this object represents a range.

Link copied to clipboard
private final Integer start
Link copied to clipboard
private final Integer value