|
RuneHive-Game
|
An item with a common chance. More...
Public Member Functions | |
| int | compareTo (WeightedObject< T > o) |
| T | get () |
| Gets the representation of the weighted chance. | |
| double | getWeight () |
| Gets the object's weight. | |
| String | toString () |
| WeightedChance (double weight, T representation) | |
Private Attributes | |
| final T | representation |
| The representation. | |
| double | weight |
| The weight type. | |
An item with a common chance.
Definition at line 10 of file WeightedChance.java.
| com.runehive.util.chance.WeightedChance< T >.WeightedChance | ( | double | weight, |
| T | representation ) |
Definition at line 18 of file WeightedChance.java.
References representation, and weight.
| int com.runehive.util.chance.WeightedChance< T >.compareTo | ( | WeightedObject< T > | o | ) |
Definition at line 37 of file WeightedChance.java.
References getWeight(), and com.runehive.util.chance.WeightedObject< T >.getWeight().
| T com.runehive.util.chance.WeightedChance< T >.get | ( | ) |
Gets the representation of the weighted chance.
Implements com.runehive.util.chance.WeightedObject< T >.
Definition at line 32 of file WeightedChance.java.
References representation.
| double com.runehive.util.chance.WeightedChance< T >.getWeight | ( | ) |
Gets the object's weight.
Implements com.runehive.util.chance.WeightedObject< T >.
Definition at line 27 of file WeightedChance.java.
References weight.
Referenced by compareTo(), and toString().
| String com.runehive.util.chance.WeightedChance< T >.toString | ( | ) |
Implements com.runehive.util.chance.WeightedObject< T >.
Definition at line 42 of file WeightedChance.java.
References getWeight().
|
private |
The representation.
Definition at line 13 of file WeightedChance.java.
Referenced by get(), and WeightedChance().
|
private |
The weight type.
Definition at line 16 of file WeightedChance.java.
Referenced by getWeight(), and WeightedChance().