Package kr.toxicity.model.api.data.raw
Record Class ModelOutliner.Tree
java.lang.Object
java.lang.Record
kr.toxicity.model.api.data.raw.ModelOutliner.Tree
- Record Components:
group- the group definitionchildren- the list of child outliner nodes
- All Implemented Interfaces:
ModelOutliner
- Enclosing interface:
ModelOutliner
public static record ModelOutliner.Tree(@NotNull ModelGroup group, @NotNull @Unmodifiable List<ModelOutliner> children)
extends Record
implements ModelOutliner
Represents a branch node (Group) in the outliner, containing child nodes.
- Since:
- 1.15.2
-
Nested Class Summary
Nested classes/interfaces inherited from interface kr.toxicity.model.api.data.raw.ModelOutliner
ModelOutliner.Reference, ModelOutliner.Tree -
Field Summary
Fields inherited from interface kr.toxicity.model.api.data.raw.ModelOutliner
PARSER -
Constructor Summary
ConstructorsConstructorDescriptionTree(@NotNull ModelGroup group, @NotNull @Unmodifiable List<ModelOutliner> children) Creates an instance of aTreerecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull @Unmodifiable List<ModelOutliner> children()Returns the value of thechildrenrecord component.final booleanIndicates whether some other object is "equal to" this one.@NotNull Stream<ModelOutliner> flatten()Flattens the outliner tree into a stream of all nodes.@NotNull ModelGroupgroup()Returns the value of thegrouprecord component.final inthashCode()Returns a hash code value for this object.@NotNull BlueprintElementtoBlueprint(@NotNull ModelLoadContext context) Converts this outliner node into a processedBlueprintElement.final StringtoString()Returns a string representation of this record class.@NotNull Stringuuid()Returns the UUID of this outliner node.
-
Constructor Details
-
Tree
public Tree(@NotNull @NotNull ModelGroup group, @NotNull @NotNull @Unmodifiable List<ModelOutliner> children) Creates an instance of aTreerecord class.
-
-
Method Details
-
toBlueprint
Description copied from interface:ModelOutlinerConverts this outliner node into a processedBlueprintElement.- Specified by:
toBlueprintin interfaceModelOutliner- Parameters:
context- the model loading context- Returns:
- the blueprint element
-
flatten
Description copied from interface:ModelOutlinerFlattens the outliner tree into a stream of all nodes.- Specified by:
flattenin interfaceModelOutliner- Returns:
- a stream of all outliner nodes
-
uuid
Description copied from interface:ModelOutlinerReturns the UUID of this outliner node.- Specified by:
uuidin interfaceModelOutliner- Returns:
- the UUID string
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. All components in this record class are compared withObjects::equals(Object,Object). -
group
Returns the value of thegrouprecord component.- Returns:
- the value of the
grouprecord component
-
children
Returns the value of thechildrenrecord component.- Returns:
- the value of the
childrenrecord component
-