RuneHive-Game
Loading...
Searching...
No Matches
WeightedObject.java
Go to the documentation of this file.
1
package
com.runehive.util.chance;
2
3
/**
4
* Represents a weighted object.
5
*
6
* @author Michael | Chex
7
*/
8
public
interface
WeightedObject
<T>
extends
Comparable<WeightedObject<T>> {
9
10
/** Gets the object's weight. */
11
double
getWeight
();
12
13
/** Gets the representation of the weighted chance. */
14
T
get
();
15
16
@Override
17
String
toString
();
18
}
com.runehive.util.chance.WeightedObject
Represents a weighted object.
Definition
WeightedObject.java:8
com.runehive.util.chance.WeightedObject.toString
String toString()
com.runehive.util.chance.WeightedObject.getWeight
double getWeight()
Gets the object's weight.