Module technology.sola.engine
Record Class JsonElementAsset
java.lang.Object
java.lang.Record
technology.sola.engine.assets.json.JsonElementAsset
- Record Components:
jsonElement- the loaded and parsed JSON file as aJsonElement
- All Implemented Interfaces:
Asset
@NullMarked
public record JsonElementAsset(technology.sola.json.JsonElement jsonElement)
extends Record
implements Asset
Represents a JSON file
Asset that was loaded.-
Constructor Summary
ConstructorsConstructorDescriptionJsonElementAsset(technology.sola.json.JsonElement jsonElement) Creates an instance of aJsonElementAssetrecord class. -
Method Summary
Modifier and TypeMethodDescriptiontechnology.sola.json.JsonArrayasArray()technology.sola.json.JsonObjectasObject()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.technology.sola.json.JsonElementReturns the value of thejsonElementrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
JsonElementAsset
public JsonElementAsset(technology.sola.json.JsonElement jsonElement) Creates an instance of aJsonElementAssetrecord class.- Parameters:
jsonElement- the value for thejsonElementrecord component
-
-
Method Details
-
asObject
public technology.sola.json.JsonObject asObject()- Returns:
- the
JsonElement.asObject()
-
asArray
public technology.sola.json.JsonArray asArray()- Returns:
- the
JsonElement.asArray()
-
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). -
jsonElement
public technology.sola.json.JsonElement jsonElement()Returns the value of thejsonElementrecord component.- Returns:
- the value of the
jsonElementrecord component
-