RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
com.osroyale.util.chance.Chance< T > Class Template Reference
Inheritance diagram for com.osroyale.util.chance.Chance< T >:

Public Member Functions

 Chance (List< WeightedObject< T > > objects)
 Chance ()
final void add (double weight, T t)
final void add (ChanceType type, T t)
next ()
WeightedObject< T > next (double boost)

Detailed Description

Handles a random chance.

Parameters
<T>- The representation type.
Author
Michael | Chex

Definition at line 39 of file Chance.java.

Constructor & Destructor Documentation

◆ Chance() [1/2]

com.osroyale.util.chance.Chance< T >.Chance ( List< WeightedObject< T > > objects)
inline

Creates a new instance of the class.

Definition at line 66 of file Chance.java.

◆ Chance() [2/2]

Creates a new instance of the class.

Definition at line 73 of file Chance.java.

Member Function Documentation

◆ add() [1/2]

final void com.osroyale.util.chance.Chance< T >.add ( ChanceType type,
T t )
inline

Adds a new WeightedObject to the #object list.

Definition at line 86 of file Chance.java.

◆ add() [2/2]

final void com.osroyale.util.chance.Chance< T >.add ( double weight,
T t )
inline

Adds a new WeightedObject to the #object list.

Definition at line 79 of file Chance.java.

◆ next() [1/2]

T com.osroyale.util.chance.Chance< T >.next ( )
inline

Generates a WeightedObject.

Definition at line 91 of file Chance.java.

◆ next() [2/2]

WeightedObject< T > com.osroyale.util.chance.Chance< T >.next ( double boost)
inline

Generates a WeightedObject.

Definition at line 107 of file Chance.java.


The documentation for this class was generated from the following file: