Record Class Warn
java.lang.Object
java.lang.Record
me.github.simonplays15.betterbansystem.core.warn.Warn
Represents a warning.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreated()
Returns the value of thecreated
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
id()
Returns the value of theid
record component.reason()
Returns the value of thereason
record component.source()
Returns the value of thesource
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
Warn
Creates an instance of aWarn
record class.- Parameters:
id
- the value for theid
record componentsource
- the value for thesource
record componentcreated
- the value for thecreated
record componentreason
- the value for thereason
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
id
public int id()Returns the value of theid
record component.- Returns:
- the value of the
id
record component
-
source
Returns the value of thesource
record component.- Returns:
- the value of the
source
record component
-
created
Returns the value of thecreated
record component.- Returns:
- the value of the
created
record component
-
reason
Returns the value of thereason
record component.- Returns:
- the value of the
reason
record component
-