ch.bind.philib.util
public final class StaticIntMap<T> extends Object
int -> T.| Modifier and Type | Method and Description |
|---|---|
boolean |
containsKey(int key) |
static <T> StaticIntMap<T> |
create(Collection<? extends IntPair<T>> elements) |
static <T> StaticIntMap<T> |
create(IntPair<T>[] elements) |
T |
get(int key) |
T |
getOrElse(int key,
T defaultVal) |
T |
getOrThrow(int key) |
int |
size() |
public static <T> StaticIntMap<T> create(Collection<? extends IntPair<T>> elements)
elements - StaticIntMap.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> StaticIntMap<T> create(IntPair<T>[] elements)
elements - StaticIntMap.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(int key)
key - key, which may be null.public T getOrElse(int key, T defaultVal)
key - key, defaultVal otherwise.public T getOrThrow(int key) throws NoSuchElementException
key - key, which may be null.NoSuchElementException - If no value is associated with key.public boolean containsKey(int key)
public int size()
Copyright © 2014. All Rights Reserved.