Package com.hypixel.hytale.common.map
Class WeightedMap.Builder<T>
java.lang.Object
com.hypixel.hytale.common.map.WeightedMap.Builder<T>
- Enclosing class:
WeightedMap<T>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate intbuild()voidclear()voidensureCapacity(int toAdd) private voidputAll(IWeightedMap<T> map) putAll(T[] arr, ToDoubleFunction<T> weight) private voidresize(int newLength) intsize()
-
Field Details
-
emptyKeys
-
keys
-
values
private double[] values -
size
private int size
-
-
Constructor Details
-
Builder
-
-
Method Details
-
putAll
-
putAll
@Nonnull public WeightedMap.Builder<T> putAll(@Nullable T[] arr, @Nonnull ToDoubleFunction<T> weight) -
put
-
ensureCapacity
public void ensureCapacity(int toAdd) -
resize
private void resize(int newLength) -
insert
-
size
public int size() -
allocated
private int allocated() -
clear
public void clear() -
build
-