Package org.apache.iceberg.util
Class StructLikeWrapper
java.lang.Object
org.apache.iceberg.util.StructLikeWrapper
Wrapper to adapt StructLike for use in maps and sets by implementing equals and hashCode.
-
Method Summary
Modifier and TypeMethodDescriptioncopyFor
(StructLike newStruct) Creates a copy of this wrapper that wraps a struct.boolean
static StructLikeWrapper
forType
(Types.StructType struct) get()
int
hashCode()
set
(StructLike newStruct)
-
Method Details
-
forType
-
copyFor
Creates a copy of this wrapper that wraps a struct.This is equivalent to
new StructLikeWrapper(type).set(newStruct)
but is cheaper because no analysis of the type is necessary.- Parameters:
newStruct
- aStructLike
row- Returns:
- a copy of this wrapper wrapping the give struct
-
set
-
get
-
equals
-
hashCode
public int hashCode()
-