Record Class DebugInfoSection
java.lang.Object
java.lang.Record
com.simibubi.create.infrastructure.debugInfo.element.DebugInfoSection
- All Implemented Interfaces:
InfoElement
public record DebugInfoSection(String name, com.google.common.collect.ImmutableList<InfoElement> elements)
extends Record
implements InfoElement
A section for organizing debug information. Can contain both information and other sections.
To create one, use the
builder method.-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionDebugInfoSection(String name, com.google.common.collect.ImmutableList<InfoElement> elements) Creates an instance of aDebugInfoSectionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static DebugInfoSection.Buildercom.google.common.collect.ImmutableList<InfoElement> elements()Returns the value of theelementsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.static DebugInfoSectionof(String name, Collection<DebugInfoSection> children) voidprint(int depth, @Nullable net.minecraft.world.entity.player.Player player, Consumer<String> lineConsumer) final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.simibubi.create.infrastructure.debugInfo.element.InfoElement
print
-
Constructor Details
-
DebugInfoSection
Creates an instance of aDebugInfoSectionrecord class.- Parameters:
name- the value for thenamerecord componentelements- the value for theelementsrecord component
-
-
Method Details
-
builder
-
print
public void print(int depth, @Nullable @Nullable net.minecraft.world.entity.player.Player player, Consumer<String> lineConsumer) - Specified by:
printin interfaceInfoElement
-
builder
-
of
-
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). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
elements
Returns the value of theelementsrecord component.- Returns:
- the value of the
elementsrecord component
-