Package org.apache.iceberg.util
Class StructLikeMap<T>
- All Implemented Interfaces:
Map<StructLike,T>
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()computeIfAbsent(StructLike struct, Supplier<T> valueSupplier) booleancontainsKey(Object key) booleancontainsValue(Object value) static <T> StructLikeMap<T> create(Types.StructType type) Creates a new StructLikeMap with the specified type using the default comparator for the type.static <T> StructLikeMap<T> create(Types.StructType type, Comparator<StructLike> comparator) Creates a new StructLikeMap with the specified type and comparator.entrySet()booleanisEmpty()keySet()put(StructLike key, T value) intsize()<U> StructLikeMap<U> transformValues(Function<T, U> func) values()Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putAll, putIfAbsent, remove, replace, replace, replaceAll
-
Method Details
-
create
Creates a new StructLikeMap with the specified type and comparator.- Parameters:
type- the struct type for the keyscomparator- the comparator for comparing struct keys- Returns:
- a new StructLikeMap instance
-
create
Creates a new StructLikeMap with the specified type using the default comparator for the type.- Parameters:
type- the struct type for the keys- Returns:
- a new StructLikeMap instance
-
size
public int size()- Specified by:
sizein interfaceMap<StructLike,T> - Overrides:
sizein classAbstractMap<StructLike,T>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceMap<StructLike,T> - Overrides:
isEmptyin classAbstractMap<StructLike,T>
-
containsKey
- Specified by:
containsKeyin interfaceMap<StructLike,T> - Overrides:
containsKeyin classAbstractMap<StructLike,T>
-
containsValue
- Specified by:
containsValuein interfaceMap<StructLike,T> - Overrides:
containsValuein classAbstractMap<StructLike,T>
-
get
- Specified by:
getin interfaceMap<StructLike,T> - Overrides:
getin classAbstractMap<StructLike,T>
-
put
- Specified by:
putin interfaceMap<StructLike,T> - Overrides:
putin classAbstractMap<StructLike,T>
-
remove
- Specified by:
removein interfaceMap<StructLike,T> - Overrides:
removein classAbstractMap<StructLike,T>
-
clear
public void clear()- Specified by:
clearin interfaceMap<StructLike,T> - Overrides:
clearin classAbstractMap<StructLike,T>
-
keySet
- Specified by:
keySetin interfaceMap<StructLike,T> - Overrides:
keySetin classAbstractMap<StructLike,T>
-
values
- Specified by:
valuesin interfaceMap<StructLike,T> - Overrides:
valuesin classAbstractMap<StructLike,T>
-
entrySet
- Specified by:
entrySetin interfaceMap<StructLike,T> - Specified by:
entrySetin classAbstractMap<StructLike,T>
-
computeIfAbsent
-
transformValues
-