Record Class SchemaNode.GroupNode
java.lang.Object
java.lang.Record
dev.hardwood.schema.SchemaNode.GroupNode
- All Implemented Interfaces:
SchemaNode
- Enclosing interface:
SchemaNode
public static record SchemaNode.GroupNode(String name, RepetitionType repetitionType, ConvertedType convertedType, List<SchemaNode> children, int maxDefinitionLevel, int maxRepetitionLevel)
extends Record
implements SchemaNode
Group node representing a struct, list, or map.
-
Nested Class Summary
Nested classes/interfaces inherited from interface SchemaNode
SchemaNode.GroupNode, SchemaNode.PrimitiveNode -
Constructor Summary
ConstructorsConstructorDescriptionGroupNode(String name, RepetitionType repetitionType, ConvertedType convertedType, List<SchemaNode> children, int maxDefinitionLevel, int maxRepetitionLevel) Creates an instance of aGroupNoderecord class. -
Method Summary
Modifier and TypeMethodDescriptionchildren()Returns the value of thechildrenrecord component.Returns the value of theconvertedTyperecord component.final booleanIndicates whether some other object is "equal to" this one.For LIST groups, returns the element node (skipping intermediate 'list' group).final inthashCode()Returns a hash code value for this object.booleanisList()Returns true if this is a LIST group.booleanisMap()Returns true if this is a MAP group.booleanisStruct()Returns true if this is a plain struct (no converted type).intReturns the value of themaxDefinitionLevelrecord component.intReturns the value of themaxRepetitionLevelrecord component.name()Returns the value of thenamerecord component.Returns the value of therepetitionTyperecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
GroupNode
public GroupNode(String name, RepetitionType repetitionType, ConvertedType convertedType, List<SchemaNode> children, int maxDefinitionLevel, int maxRepetitionLevel) Creates an instance of aGroupNoderecord class.- Parameters:
name- the value for thenamerecord componentrepetitionType- the value for therepetitionTyperecord componentconvertedType- the value for theconvertedTyperecord componentchildren- the value for thechildrenrecord componentmaxDefinitionLevel- the value for themaxDefinitionLevelrecord componentmaxRepetitionLevel- the value for themaxRepetitionLevelrecord component
-
-
Method Details
-
isList
public boolean isList()Returns true if this is a LIST group. -
isMap
public boolean isMap()Returns true if this is a MAP group. -
isStruct
public boolean isStruct()Returns true if this is a plain struct (no converted type). -
getListElement
For LIST groups, returns the element node (skipping intermediate 'list' group). Returns null if not a list or improperly structured. -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
name
Returns the value of thenamerecord component.- Specified by:
namein interfaceSchemaNode- Returns:
- the value of the
namerecord component
-
repetitionType
Returns the value of therepetitionTyperecord component.- Specified by:
repetitionTypein interfaceSchemaNode- Returns:
- the value of the
repetitionTyperecord component
-
convertedType
Returns the value of theconvertedTyperecord component.- Returns:
- the value of the
convertedTyperecord component
-
children
Returns the value of thechildrenrecord component.- Returns:
- the value of the
childrenrecord component
-
maxDefinitionLevel
public int maxDefinitionLevel()Returns the value of themaxDefinitionLevelrecord component.- Specified by:
maxDefinitionLevelin interfaceSchemaNode- Returns:
- the value of the
maxDefinitionLevelrecord component
-
maxRepetitionLevel
public int maxRepetitionLevel()Returns the value of themaxRepetitionLevelrecord component.- Specified by:
maxRepetitionLevelin interfaceSchemaNode- Returns:
- the value of the
maxRepetitionLevelrecord component
-