Record Class VersionedJsonData
java.lang.Object
java.lang.Record
net.thomilist.dimensionalinventories.module.version.VersionedJsonData
-
Constructor Summary
ConstructorsConstructorDescriptionVersionedJsonData(int version, com.google.gson.JsonElement data) Creates an instance of aVersionedJsonDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.google.gson.JsonElementdata()Returns the value of thedatarecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.intversion()Returns the value of theversionrecord component.
-
Constructor Details
-
VersionedJsonData
public VersionedJsonData(int version, com.google.gson.JsonElement data) Creates an instance of aVersionedJsonDatarecord class.- Parameters:
version- the value for theversionrecord componentdata- the value for thedatarecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
version
public int version()Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-
data
public com.google.gson.JsonElement data()Returns the value of thedatarecord component.- Returns:
- the value of the
datarecord component
-