Module technology.sola.engine
Record Class GuiJsonDocument
java.lang.Object
java.lang.Record
technology.sola.engine.assets.graphics.gui.GuiJsonDocument
- Record Components:
rootElement
- the rootElementGuiElement
- All Implemented Interfaces:
Asset
@NullMarked
public record GuiJsonDocument(GuiElement<?,?> rootElement)
extends Record
implements Asset
GuiJsonDocument as an
Asset
containing a GuiElement
and its children that were loaded from a JSON file.-
Constructor Summary
ConstructorsConstructorDescriptionGuiJsonDocument
(GuiElement<?, ?> rootElement) Creates an instance of aGuiJsonDocument
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.GuiElement<?,
?> Returns the value of therootElement
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
GuiJsonDocument
Creates an instance of aGuiJsonDocument
record class.- Parameters:
rootElement
- the value for therootElement
record component
-
-
Method Details
-
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)
. -
rootElement
Returns the value of therootElement
record component.- Returns:
- the value of the
rootElement
record component
-