public class WeightedValue<T extends Number> extends Object
Constructor and Description |
---|
WeightedValue(T value,
long weight)
Creates a new immutable instance with the specified value and weight.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
T |
getValue()
Gets the stored value.
|
long |
getWeight()
Gets the weight of the value.
|
int |
hashCode() |
String |
toString() |
public WeightedValue(T value, long weight)
value
- The value to be stored.weight
- The weight of the value.public T getValue()
public long getWeight()
Copyright © 2010–2017 PerfCake Community. All rights reserved.