ch.bind.philib.util
public final class StaticLongMap<T> extends Object
long -> T.| Modifier and Type | Method and Description |
|---|---|
boolean |
containsKey(long key) |
static <T> StaticLongMap<T> |
create(Collection<? extends LongPair<T>> elements) |
static <T> StaticLongMap<T> |
create(LongPair<T>[] elements) |
T |
get(long key) |
T |
getOrElse(long key,
T defaultVal) |
T |
getOrThrow(long key) |
int |
size() |
public static <T> StaticLongMap<T> create(Collection<? extends LongPair<T>> elements)
elements - StaticLongMap.IllegalArgumentException - If the elements parameter is null, empty or contains
duplicate keys.NullPointerException - If any value in elements is a null-value.public static <T> StaticLongMap<T> create(LongPair<T>[] elements)
elements - StaticLongMap.IllegalArgumentException - If the elements parameter is null, empty or contains
duplicate keys.NullPointerException - If any value in elements is a null-value.public T get(long key)
key - key, which may be null.public T getOrElse(long key, T defaultVal)
key - key, defaultVal otherwise.public T getOrThrow(long key) throws NoSuchElementException
key - key, which may be null.NoSuchElementException - If no value is associated with key.public boolean containsKey(long key)
public int size()
Copyright © 2013. All Rights Reserved.