Class RandDistribution<T>
java.lang.Object
com.github.clevernucleus.dataattributes.api.util.RandDistribution<T>
- Type Parameters:
T- Input type.
Specialised object that takes in a type and works out weighted distributions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds to the internal inventory of the distributor.
-
Constructor Details
-
RandDistribution
Constructor.- Parameters:
fallback- Default value that is returned in case something fails.
-
-
Method Details
-
add
Adds to the internal inventory of the distributor.- Parameters:
object- Input object type.weight- Input object type's weight.
-
getDistributedRandom
- Returns:
- A randomly distributed and weighted result.
-