Package org.moddingx.libx.util.data
Record Class ResourceList.RuleEntry
java.lang.Object
java.lang.Record
org.moddingx.libx.util.data.ResourceList.RuleEntry
- Enclosing class:
- ResourceList
public static record ResourceList.RuleEntry(String value, boolean regex, @Nullable Boolean allow)
extends Record
And entry that represents a rule in this
ResourceList
.
This is only meant to give access to the values in a resource list, it can't
be used to build new rules.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionallow()
Returns the value of theallow
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.boolean
regex()
Returns the value of theregex
record component.final String
toString()
Returns a string representation of this record class.value()
Returns the value of thevalue
record component.
-
Constructor Details
-
RuleEntry
Creates an instance of aRuleEntry
record class.- Parameters:
value
- the value for thevalue
record componentregex
- the value for theregex
record componentallow
- the value for theallow
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 '=='. -
value
Returns the value of thevalue
record component.- Returns:
- the value of the
value
record component
-
regex
public boolean regex()Returns the value of theregex
record component.- Returns:
- the value of the
regex
record component
-
allow
Returns the value of theallow
record component.- Returns:
- the value of the
allow
record component
-