public final class StaticIntMap<T>
extends java.lang.Object
int -> T.| Modifier and Type | Method and Description |
|---|---|
boolean |
containsKey(int key) |
static <T> StaticIntMap<T> |
create(java.util.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(java.util.Collection<? extends IntPair<T>> elements)
elements - StaticIntMap.java.lang.IllegalArgumentException - If the elements parameter is null, empty or contains
duplicate keys.java.lang.NullPointerException - If any value in elements is a null-value.public static <T> StaticIntMap<T> create(IntPair<T>[] elements)
elements - StaticIntMap.java.lang.IllegalArgumentException - If the elements parameter is null, empty or contains
duplicate keys.java.lang.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 java.util.NoSuchElementException
key - key, which may be null.java.util.NoSuchElementException - If no value is associated with key.public boolean containsKey(int key)
public int size()
Copyright © 2012. All Rights Reserved.