Package dev.cel.common.values
Class ImmutableMapValue<K extends CelValue,V extends CelValue>
- java.lang.Object
-
- dev.cel.common.values.CelValue
-
- dev.cel.common.values.MapValue<K,V>
-
- dev.cel.common.values.ImmutableMapValue<K,V>
-
- All Implemented Interfaces:
SelectableValue<K>,java.util.Map<K,V>
@Immutable(containerOf={"K","V"}) public final class ImmutableMapValue<K extends CelValue,V extends CelValue> extends MapValue<K,V>MapValue is an abstract representation of an immutable map containingCelValueas keys and values.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsKey(java.lang.Object key)booleancontainsValue(java.lang.Object val)static <K extends CelValue,V extends CelValue>
ImmutableMapValue<K,V>create(java.util.Map<K,V> value)java.util.Set<java.util.Map.Entry<K,V>>entrySet()booleanequals(java.lang.Object obj)inthashCode()booleanisEmpty()java.util.Set<K>keySet()intsize()com.google.common.collect.ImmutableMap<K,V>value()The underlying value.java.util.Collection<V>values()-
Methods inherited from class dev.cel.common.values.MapValue
celType, clear, compute, computeIfAbsent, computeIfPresent, find, get, isZeroValue, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, select
-
-
-
-
Method Detail
-
create
public static <K extends CelValue,V extends CelValue> ImmutableMapValue<K,V> create(java.util.Map<K,V> value)
-
value
public com.google.common.collect.ImmutableMap<K,V> value()
Description copied from class:CelValueThe underlying value. This is typically the Java native value or a derived instance of CelValue (ex: an element in lists or key/value pair in maps).
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
containsKey
public boolean containsKey(java.lang.Object key)
-
containsValue
public boolean containsValue(java.lang.Object val)
-
hashCode
public int hashCode()
-
equals
public boolean equals(java.lang.Object obj)
-
keySet
public java.util.Set<K> keySet()
-
values
public java.util.Collection<V> values()
-
-