org.javimmutable.collections.common
Class ArrayToMapAdaptor<T>
java.lang.Object
java.util.AbstractMap<Integer,T>
org.javimmutable.collections.common.ArrayToMapAdaptor<T>
- All Implemented Interfaces:
- Map<Integer,T>
@Immutable
public class ArrayToMapAdaptor<T>
- extends AbstractMap<Integer,T>
Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
ArrayToMapAdaptor
public ArrayToMapAdaptor(JImmutableArray<T> map)
of
public static <V> ArrayToMapAdaptor<V> of(JImmutableArray<V> map)
size
public int size()
- Specified by:
size
in interface Map<Integer,T>
- Overrides:
size
in class AbstractMap<Integer,T>
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interface Map<Integer,T>
- Overrides:
isEmpty
in class AbstractMap<Integer,T>
containsKey
public boolean containsKey(Object o)
- Specified by:
containsKey
in interface Map<Integer,T>
- Overrides:
containsKey
in class AbstractMap<Integer,T>
containsValue
public boolean containsValue(Object o)
- Uses O(n) traversal of the PersistentMap to search for a matching value.
- Specified by:
containsValue
in interface Map<Integer,T>
- Overrides:
containsValue
in class AbstractMap<Integer,T>
- Parameters:
o
-
- Returns:
get
public T get(Object o)
- Specified by:
get
in interface Map<Integer,T>
- Overrides:
get
in class AbstractMap<Integer,T>
put
public T put(Integer k,
T t)
- Specified by:
put
in interface Map<Integer,T>
- Overrides:
put
in class AbstractMap<Integer,T>
remove
public T remove(Object o)
- Specified by:
remove
in interface Map<Integer,T>
- Overrides:
remove
in class AbstractMap<Integer,T>
putAll
public void putAll(Map<? extends Integer,? extends T> map)
- Specified by:
putAll
in interface Map<Integer,T>
- Overrides:
putAll
in class AbstractMap<Integer,T>
clear
public void clear()
- Specified by:
clear
in interface Map<Integer,T>
- Overrides:
clear
in class AbstractMap<Integer,T>
keySet
public Set<Integer> keySet()
- Specified by:
keySet
in interface Map<Integer,T>
- Overrides:
keySet
in class AbstractMap<Integer,T>
values
public Collection<T> values()
- Specified by:
values
in interface Map<Integer,T>
- Overrides:
values
in class AbstractMap<Integer,T>
entrySet
public Set<Map.Entry<Integer,T>> entrySet()
- Specified by:
entrySet
in interface Map<Integer,T>
- Specified by:
entrySet
in class AbstractMap<Integer,T>
Copyright © 2014 Burton Computer Corporation. All rights reserved.