public class WeightedMap
Class WeightedMap. Provides weightedmap functionality for the Hytale server.
java.lang.Object > WeightedMap
Field Summary
totalWeight
private
double
totalWeight
Field totalWeight.
immutable
private
boolean
immutable
Field immutable.
Method Detail
add
Method add.
- Parameters:
@Nonnull final Telementfinal doubleweight
get
public
double
get
(@Nonnull final T element)
Method get.
- Parameters:
@Nonnull final Telement
pick
public
T
pick
(@Nonnull final Random rand)
Method pick.
- Parameters:
@Nonnull final Randomrand
size
public
int
size
()
Method size.
allElements
public
List
allElements
()
Method allElements.
makeImmutable
public
void
makeImmutable
()
Method makeImmutable.
isImmutable
public
boolean
isImmutable
()
Method isImmutable.
forEach
public
void
forEach
(@Nonnull final BiConsumer consumer)
Method forEach.
- Parameters:
@Nonnull final BiConsumerconsumer
toString
public
String
toString
()
Method toString.