Record Class FilterResult
java.lang.Object
java.lang.Record
ua.mcchickenstudio.opencreative.settings.filters.FilterResult
public record FilterResult(@NotNull String originalMessage, @NotNull String filteredMessage, Filter.Context context, @Nullable FilterRule rule, @NotNull List<String> matches)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionFilterResult(@NotNull String originalMessage, @NotNull String filteredMessage, Filter.Context context, @Nullable FilterRule rule, @NotNull List<String> matches) Creates an instance of aFilterResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncontext()Returns the value of thecontextrecord component.final booleanIndicates whether some other object is "equal to" this one.@NotNull StringReturns the value of thefilteredMessagerecord component.final inthashCode()Returns a hash code value for this object.matches()Returns the value of thematchesrecord component.voidonViolation(@NotNull org.bukkit.entity.Player player) @NotNull StringReturns the value of theoriginalMessagerecord component.@Nullable FilterRulerule()Returns the value of therulerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
FilterResult
public FilterResult(@NotNull @NotNull String originalMessage, @NotNull @NotNull String filteredMessage, @NotNull Filter.Context context, @Nullable @Nullable FilterRule rule, @NotNull @NotNull List<String> matches) Creates an instance of aFilterResultrecord class.- Parameters:
originalMessage- the value for theoriginalMessagerecord componentfilteredMessage- the value for thefilteredMessagerecord componentcontext- the value for thecontextrecord componentrule- the value for therulerecord componentmatches- the value for thematchesrecord component
-
-
Method Details
-
onViolation
public void onViolation(@NotNull @NotNull org.bukkit.entity.Player player) -
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. All components in this record class are compared withObjects::equals(Object,Object). -
originalMessage
Returns the value of theoriginalMessagerecord component.- Returns:
- the value of the
originalMessagerecord component
-
filteredMessage
Returns the value of thefilteredMessagerecord component.- Returns:
- the value of the
filteredMessagerecord component
-
context
Returns the value of thecontextrecord component.- Returns:
- the value of the
contextrecord component
-
rule
Returns the value of therulerecord component.- Returns:
- the value of the
rulerecord component
-
matches
Returns the value of thematchesrecord component.- Returns:
- the value of the
matchesrecord component
-