Package dev.latvian.mods.kubejs.script
Record Class SourceLine
java.lang.Object
java.lang.Record
dev.latvian.mods.kubejs.script.SourceLine
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSourceLine(String source, int line) Creates an instance of aSourceLinerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static SourceLinefromJson(com.google.gson.JsonObject json) final inthashCode()Returns a hash code value for this object.booleanintline()Returns the value of thelinerecord component.static SourceLineof(@Nullable dev.latvian.mods.rhino.Context cx) static SourceLinestatic SourceLineread(net.minecraft.network.FriendlyByteBuf buf) source()Returns the value of thesourcerecord component.com.google.gson.JsonObjecttoJson()toString()Returns a string representation of this record class.static voidwrite(net.minecraft.network.FriendlyByteBuf buf, SourceLine sourceLine)
-
Field Details
-
UNKNOWN
-
-
Constructor Details
-
SourceLine
Creates an instance of aSourceLinerecord class.- Parameters:
source- the value for thesourcerecord componentline- the value for thelinerecord component
-
-
Method Details
-
of
-
fromJson
-
toJson
public com.google.gson.JsonObject toJson() -
read
-
of
-
isUnknown
public boolean isUnknown() -
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. -
write
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
source
Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-
line
public int line()Returns the value of thelinerecord component.- Returns:
- the value of the
linerecord component
-