Package org.apache.arrow.vector.util
Class PromotableMultiMapWithOrdinal<K,V>
java.lang.Object
org.apache.arrow.vector.util.PromotableMultiMapWithOrdinal<K,V>
- Type Parameters:
K
- key typeV
- value type
- All Implemented Interfaces:
MapWithOrdinal<K,
V>
Implementation of MapWithOrdinal that allows for promotion to multimap when duplicate fields
exist.
-
Constructor Summary
ConstructorDescriptionPromotableMultiMapWithOrdinal
(boolean promotable, AbstractStructVector.ConflictPolicy conflictPolicy) Create promotable map. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
boolean
containsKey
(K key) getByOrdinal
(int id) int
getOrdinal
(K key) boolean
isEmpty()
keys()
boolean
boolean
boolean
void
setConflictPolicy
(AbstractStructVector.ConflictPolicy conflictPolicy) int
size()
values()
-
Constructor Details
-
PromotableMultiMapWithOrdinal
public PromotableMultiMapWithOrdinal(boolean promotable, AbstractStructVector.ConflictPolicy conflictPolicy) Create promotable map.- Parameters:
promotable
- if promotion is allowed, otherwise delegate to MapWithOrdinal.conflictPolicy
- how to handle name conflicts.
-
-
Method Details
-
getByOrdinal
- Specified by:
getByOrdinal
in interfaceMapWithOrdinal<K,
V>
-
getOrdinal
- Specified by:
getOrdinal
in interfaceMapWithOrdinal<K,
V>
-
size
public int size()- Specified by:
size
in interfaceMapWithOrdinal<K,
V>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceMapWithOrdinal<K,
V>
-
get
- Specified by:
get
in interfaceMapWithOrdinal<K,
V>
-
getAll
- Specified by:
getAll
in interfaceMapWithOrdinal<K,
V>
-
put
- Specified by:
put
in interfaceMapWithOrdinal<K,
V>
-
values
- Specified by:
values
in interfaceMapWithOrdinal<K,
V>
-
containsKey
- Specified by:
containsKey
in interfaceMapWithOrdinal<K,
V>
-
remove
- Specified by:
remove
in interfaceMapWithOrdinal<K,
V>
-
removeAll
- Specified by:
removeAll
in interfaceMapWithOrdinal<K,
V>
-
clear
public void clear()- Specified by:
clear
in interfaceMapWithOrdinal<K,
V>
-
keys
- Specified by:
keys
in interfaceMapWithOrdinal<K,
V>
-
setConflictPolicy
-