Package org.ojalgo.type.keyvalue
Class IndexedMap<K,V>
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- org.ojalgo.type.keyvalue.IndexedMap<K,V>
-
- All Implemented Interfaces:
java.util.Map<K,V>
,Paired<K,V>
- Direct Known Subclasses:
IndexedMap.MappedPrimitives
public class IndexedMap<K,V> extends java.util.AbstractMap<K,V> implements Paired<K,V>
Wrap two arrays (of keys and values) and treat the result as aMap
. There is no check that the supplied array of keys does not contain duplicates – the index is the real "key".
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
IndexedMap.MappedPrimitives<K>
-
Field Summary
Fields Modifier and Type Field Description private EntrySet<K,V>
myEntrySet
-
Constructor Summary
Constructors Constructor Description IndexedMap(EntrySet<K,V> entries)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description EntrySet<K,V>
entrySet()
K
getKey(int index)
EntryPair<K,V>
getPair(int index)
V
getValue(int index)
static <K extends java.lang.Enum<K>>
IndexedMap.MappedPrimitives<K>of(java.lang.Class<K> keyType, byte defaultValue)
static <K extends java.lang.Enum<K>>
IndexedMap.MappedPrimitives<K>of(java.lang.Class<K> keyType, double defaultValue)
static <K extends java.lang.Enum<K>>
IndexedMap.MappedPrimitives<K>of(java.lang.Class<K> keyType, float defaultValue)
static <K extends java.lang.Enum<K>>
IndexedMap.MappedPrimitives<K>of(java.lang.Class<K> keyType, int defaultValue)
static <K extends java.lang.Enum<K>>
IndexedMap.MappedPrimitives<K>of(java.lang.Class<K> keyType, long defaultValue)
static <K extends java.lang.Enum<K>>
IndexedMap.MappedPrimitives<K>of(java.lang.Class<K> keyType, short defaultValue)
static <K extends java.lang.Enum<K>,V>
IndexedMap<K,V>of(java.lang.Class<K> keyType, java.lang.Class<V> valueType)
static <K extends java.lang.Enum<K>,V>
IndexedMap<K,V>of(java.lang.Class<K> keyType, V defaultValue)
int
size()
-
Methods inherited from class java.util.AbstractMap
clear, clone, containsKey, containsValue, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, toString, values
-
-
-
-
Method Detail
-
of
public static <K extends java.lang.Enum<K>> IndexedMap.MappedPrimitives<K> of(java.lang.Class<K> keyType, byte defaultValue)
-
of
public static <K extends java.lang.Enum<K>,V> IndexedMap<K,V> of(java.lang.Class<K> keyType, java.lang.Class<V> valueType)
-
of
public static <K extends java.lang.Enum<K>> IndexedMap.MappedPrimitives<K> of(java.lang.Class<K> keyType, double defaultValue)
-
of
public static <K extends java.lang.Enum<K>> IndexedMap.MappedPrimitives<K> of(java.lang.Class<K> keyType, float defaultValue)
-
of
public static <K extends java.lang.Enum<K>> IndexedMap.MappedPrimitives<K> of(java.lang.Class<K> keyType, int defaultValue)
-
of
public static <K extends java.lang.Enum<K>> IndexedMap.MappedPrimitives<K> of(java.lang.Class<K> keyType, long defaultValue)
-
of
public static <K extends java.lang.Enum<K>> IndexedMap.MappedPrimitives<K> of(java.lang.Class<K> keyType, short defaultValue)
-
of
public static <K extends java.lang.Enum<K>,V> IndexedMap<K,V> of(java.lang.Class<K> keyType, V defaultValue)
-
-