Package io.opentelemetry.api.internal
Class ReadOnlyArrayMap<K,V>
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- io.opentelemetry.api.internal.ReadOnlyArrayMap<K,V>
-
- All Implemented Interfaces:
java.util.Map<K,V>
public final class ReadOnlyArrayMap<K,V> extends java.util.AbstractMap<K,V>
A read-only view of an array of key-value pairs.This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
ReadOnlyArrayMap.EntrySetView
(package private) class
ReadOnlyArrayMap.KeySetView
(package private) class
ReadOnlyArrayMap.SetView<E>
(package private) class
ReadOnlyArrayMap.ValuesView
-
Constructor Summary
Constructors Modifier Constructor Description private
ReadOnlyArrayMap(java.util.List<java.lang.Object> array)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) int
arrayIndexOfKey(java.lang.Object o)
void
clear()
boolean
containsKey(java.lang.Object o)
boolean
containsValue(java.lang.Object o)
java.util.Set<java.util.Map.Entry<K,V>>
entrySet()
V
get(java.lang.Object o)
boolean
isEmpty()
(package private) K
key(int i)
java.util.Set<K>
keySet()
V
put(K key, V value)
void
putAll(java.util.Map<? extends K,? extends V> m)
V
remove(java.lang.Object key)
int
size()
java.lang.String
toString()
(package private) V
value(int i)
java.util.Collection<V>
values()
static <K,V>
java.util.Map<K,V>wrap(java.util.List<java.lang.Object> array)
Returns a read-only view of the givenarray
.
-
-
-
Method Detail
-
wrap
public static <K,V> java.util.Map<K,V> wrap(java.util.List<java.lang.Object> array)
Returns a read-only view of the givenarray
.
-
size
public int size()
-
containsKey
public boolean containsKey(java.lang.Object o)
-
containsValue
public boolean containsValue(java.lang.Object o)
-
get
@Nullable public V get(java.lang.Object o)
-
arrayIndexOfKey
int arrayIndexOfKey(java.lang.Object o)
-
key
K key(int i)
-
value
V value(int i)
-
keySet
public java.util.Set<K> keySet()
-
values
public java.util.Collection<V> values()
-
isEmpty
public boolean isEmpty()
-
remove
public V remove(java.lang.Object key)
-
clear
public void clear()
-
-