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

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

Public Member Functions

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

Static Public Member Functions

static FloatRange floatRangeGreaterThanOrEq (float min)
 Constructs a FloatRange with a given lower bound and no upper bound. More...
 
static FloatRange floatRangeLessThanOrEq (float max)
 Constructs a FloatRange with a given upper bound and no lower bound. More...
 

Detailed Description

A class representing a range of floats.

Constructor & Destructor Documentation

◆ FloatRange()

dev.jorel.commandapi.wrappers.FloatRange.FloatRange ( float  low,
float  high 
)

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

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

Member Function Documentation

◆ floatRangeGreaterThanOrEq()

static FloatRange dev.jorel.commandapi.wrappers.FloatRange.floatRangeGreaterThanOrEq ( float  min)
static

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

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

◆ floatRangeLessThanOrEq()

static FloatRange dev.jorel.commandapi.wrappers.FloatRange.floatRangeLessThanOrEq ( float  max)
static

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

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

◆ getLowerBound()

float dev.jorel.commandapi.wrappers.FloatRange.getLowerBound ( )

The lower bound of this range.

Returns
the lower bound of this range

◆ getUpperBound()

float dev.jorel.commandapi.wrappers.FloatRange.getUpperBound ( )

The upper bound of this range.

Returns
the upper bound of this range

◆ isInRange()

boolean dev.jorel.commandapi.wrappers.FloatRange.isInRange ( float  f)

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

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

◆ toString()

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

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

Returns
a Minecraft string for use with arguments