CommandAPI 11.1.0
An API for the command UI introduced in Minecraft 1.13
dev.jorel.commandapi.wrappers.DoubleRange Class Reference

A class representing a range of doubles. More...

Public Member Functions

 DoubleRange (double low, double high)
 Constructs a DoubleRange with a lower bound and an upper bound. More...
 
double getLowerBound ()
 The lower bound of this range. More...
 
double getUpperBound ()
 The upper bound of this range. More...
 
boolean isInRange (double f)
 Determines if a double is within range of the lower bound (inclusive) and the upper bound (inclusive). More...
 
String toString ()
 Converts this DoubleRange to a Minecraft string for use with arguments. More...
 
int hashCode ()
 
boolean equals (Object obj)
 

Static Public Member Functions

static DoubleRange doubleRangeGreaterThanOrEq (double min)
 Constructs a DoubleRange with a given lower bound and no upper bound. More...
 
static DoubleRange doubleRangeLessThanOrEq (double max)
 Constructs a DoubleRange with a given upper bound and no lower bound. More...
 

Detailed Description

A class representing a range of doubles.

Constructor & Destructor Documentation

◆ DoubleRange()

dev.jorel.commandapi.wrappers.DoubleRange.DoubleRange ( double  low,
double  high 
)

Constructs a DoubleRange with a lower bound and an upper bound.

Parameters
lowthe lower bound of this range
highthe upper bound of this range

Member Function Documentation

◆ doubleRangeGreaterThanOrEq()

static DoubleRange dev.jorel.commandapi.wrappers.DoubleRange.doubleRangeGreaterThanOrEq ( double  min)
static

Constructs a DoubleRange with a given lower bound and no upper bound.

Parameters
minthe lower bound of this range
Returns
a DoubleRange min..

◆ doubleRangeLessThanOrEq()

static DoubleRange dev.jorel.commandapi.wrappers.DoubleRange.doubleRangeLessThanOrEq ( double  max)
static

Constructs a DoubleRange with a given upper bound and no lower bound.

Parameters
maxthe upper bound of this range
Returns
a DoubleRange ..max

◆ getLowerBound()

double dev.jorel.commandapi.wrappers.DoubleRange.getLowerBound ( )

The lower bound of this range.

Returns
the lower bound of this range

◆ getUpperBound()

double dev.jorel.commandapi.wrappers.DoubleRange.getUpperBound ( )

The upper bound of this range.

Returns
the upper bound of this range

◆ isInRange()

boolean dev.jorel.commandapi.wrappers.DoubleRange.isInRange ( double  f)

Determines if a double is within range of the lower bound (inclusive) and the upper bound (inclusive).

Parameters
fthe double to check within range
Returns
true if the given double is within the declared range

◆ toString()

String dev.jorel.commandapi.wrappers.DoubleRange.toString ( )

Converts this DoubleRange to a Minecraft string for use with arguments.

Returns
a Minecraft string for use with arguments