Record Class JSONParseRecord
java.lang.Object
java.lang.Record
com.oracle.truffle.js.builtins.json.JSONParseRecord
public record JSONParseRecord(Object value, com.oracle.truffle.api.strings.TruffleString source, List<JSONParseRecord> elements, org.graalvm.collections.EconomicMap<com.oracle.truffle.api.strings.TruffleString, JSONParseRecord> entries)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionJSONParseRecord(Object value, com.oracle.truffle.api.strings.TruffleString source, List<JSONParseRecord> elements, org.graalvm.collections.EconomicMap<com.oracle.truffle.api.strings.TruffleString, JSONParseRecord> entries) Creates an instance of aJSONParseRecordrecord class. -
Method Summary
Modifier and TypeMethodDescriptionelements()Returns the value of theelementsrecord component.org.graalvm.collections.EconomicMap<com.oracle.truffle.api.strings.TruffleString, JSONParseRecord> entries()Returns the value of theentriesrecord component.final booleanIndicates whether some other object is "equal to" this one.static JSONParseRecordstatic JSONParseRecordforLiteral(Object value, com.oracle.truffle.api.strings.TruffleString source) static JSONParseRecordfinal inthashCode()Returns a hash code value for this object.com.oracle.truffle.api.strings.TruffleStringsource()Returns the value of thesourcerecord component.final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
JSONParseRecord
public JSONParseRecord(Object value, com.oracle.truffle.api.strings.TruffleString source, List<JSONParseRecord> elements, org.graalvm.collections.EconomicMap<com.oracle.truffle.api.strings.TruffleString, JSONParseRecord> entries) Creates an instance of aJSONParseRecordrecord class.- Parameters:
value- the value for thevaluerecord componentsource- the value for thesourcerecord componentelements- the value for theelementsrecord componententries- the value for theentriesrecord component
-
-
Method Details
-
forLiteral
public static JSONParseRecord forLiteral(Object value, com.oracle.truffle.api.strings.TruffleString source) -
forArray
-
forObject
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-
source
public com.oracle.truffle.api.strings.TruffleString source()Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-
elements
Returns the value of theelementsrecord component.- Returns:
- the value of the
elementsrecord component
-
entries
public org.graalvm.collections.EconomicMap<com.oracle.truffle.api.strings.TruffleString, JSONParseRecord> entries()Returns the value of theentriesrecord component.- Returns:
- the value of the
entriesrecord component
-