Top Description Fields Constructors Methods
com.dlsc.gemsfx.util

public Class IntegerRange

extends Object
Class Inheritance

Represents an inclusive range of integers. This record defines a start and end point for the range, both inclusive.

Field Summary

Modifier and TypeField and Description
private final int
private final int

Constructor Summary

AccessConstructor and Description
public
IntegerRange(int fromInclusive, int toInclusive)

public
IntegerRange(int toInclusive)

Constructs an IntegerRange with one endpoint specified by the given number and the other endpoint set to 0.

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

The larger of the two numbers defining the range.
getMax
()

Retrieves the maximum value in the range.

public int

Returns:

The smaller of the two numbers defining the range.
getMin
()

Retrieves the minimum value in the range.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fromInclusiveback to summary
private final int fromInclusive
toInclusiveback to summary
private final int toInclusive

Constructor Detail

IntegerRangeback to summary
public IntegerRange(int fromInclusive, int toInclusive)
IntegerRangeback to summary
public IntegerRange(int toInclusive)

Constructs an IntegerRange with one endpoint specified by the given number and the other endpoint set to 0.

Method Detail

getMaxback to summary
public int getMax()

Retrieves the maximum value in the range.

Returns:int

The larger of the two numbers defining the range.

getMinback to summary
public int getMin()

Retrieves the minimum value in the range.

Returns:int

The smaller of the two numbers defining the range.