Record Class ActionResult
java.lang.Object
java.lang.Record
su.nightexpress.excellentclaims.api.service.ActionResult
@NullMarked
public record ActionResult(boolean result, ActionReason reason, @Nullable su.nightexpress.nightcore.locale.entry.MessageLocale locale, @Nullable Consumer<su.nightexpress.nightcore.util.placeholder.PlaceholderContext.Builder> placeholders)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionActionResult(boolean result, ActionReason reason, @Nullable su.nightexpress.nightcore.locale.entry.MessageLocale locale, @Nullable Consumer<su.nightexpress.nightcore.util.placeholder.PlaceholderContext.Builder> placeholders) Creates an instance of aActionResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static ActionResultfail()static ActionResultfail(ActionReason reason) static ActionResultfail(ActionReason reason, su.nightexpress.nightcore.locale.entry.MessageLocale locale) static ActionResultfail(ActionReason reason, su.nightexpress.nightcore.locale.entry.MessageLocale locale, Consumer<su.nightexpress.nightcore.util.placeholder.PlaceholderContext.Builder> placeholders) static ActionResultfail(su.nightexpress.nightcore.locale.entry.MessageLocale locale) static ActionResultfail(su.nightexpress.nightcore.locale.entry.MessageLocale locale, Consumer<su.nightexpress.nightcore.util.placeholder.PlaceholderContext.Builder> placeholders) booleanfailure()Optional<su.nightexpress.nightcore.locale.entry.MessageLocale> feedback()booleanhandleFeedback(BiConsumer<su.nightexpress.nightcore.locale.entry.MessageLocale, Consumer<su.nightexpress.nightcore.util.placeholder.PlaceholderContext.Builder>> consumer) booleanhandleFeedback(Consumer<su.nightexpress.nightcore.locale.entry.MessageLocale> consumer) final inthashCode()Returns a hash code value for this object.booleanis(ActionReason reason) @Nullable su.nightexpress.nightcore.locale.entry.MessageLocalelocale()Returns the value of thelocalerecord component.static ActionResultof(boolean result) static ActionResultof(boolean result, ActionReason reason) static ActionResultof(boolean result, ActionReason reason, su.nightexpress.nightcore.locale.entry.MessageLocale locale) static ActionResultof(boolean result, ActionReason reason, su.nightexpress.nightcore.locale.entry.MessageLocale locale, Consumer<su.nightexpress.nightcore.util.placeholder.PlaceholderContext.Builder> placeholders) static ActionResultof(boolean result, su.nightexpress.nightcore.locale.entry.MessageLocale locale) static ActionResultof(boolean result, su.nightexpress.nightcore.locale.entry.MessageLocale locale, Consumer<su.nightexpress.nightcore.util.placeholder.PlaceholderContext.Builder> placeholders) static ActionResultok()static ActionResultok(ActionReason reason) static ActionResultok(ActionReason reason, su.nightexpress.nightcore.locale.entry.MessageLocale locale) static ActionResultok(ActionReason reason, su.nightexpress.nightcore.locale.entry.MessageLocale locale, Consumer<su.nightexpress.nightcore.util.placeholder.PlaceholderContext.Builder> placeholders) static ActionResultok(su.nightexpress.nightcore.locale.entry.MessageLocale locale) static ActionResultok(su.nightexpress.nightcore.locale.entry.MessageLocale locale, Consumer<su.nightexpress.nightcore.util.placeholder.PlaceholderContext.Builder> placeholders) @Nullable Consumer<su.nightexpress.nightcore.util.placeholder.PlaceholderContext.Builder> Returns the value of theplaceholdersrecord component.reason()Returns the value of thereasonrecord component.booleanresult()Returns the value of theresultrecord component.booleansuccess()final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ActionResult
public ActionResult(boolean result, ActionReason reason, @Nullable su.nightexpress.nightcore.locale.entry.MessageLocale locale, @Nullable Consumer<su.nightexpress.nightcore.util.placeholder.PlaceholderContext.Builder> placeholders) Creates an instance of aActionResultrecord class.- Parameters:
result- the value for theresultrecord componentreason- the value for thereasonrecord componentlocale- the value for thelocalerecord componentplaceholders- the value for theplaceholdersrecord component
-
-
Method Details
-
of
-
of
-
of
public static ActionResult of(boolean result, su.nightexpress.nightcore.locale.entry.MessageLocale locale) -
of
public static ActionResult of(boolean result, ActionReason reason, su.nightexpress.nightcore.locale.entry.MessageLocale locale) -
of
public static ActionResult of(boolean result, su.nightexpress.nightcore.locale.entry.MessageLocale locale, Consumer<su.nightexpress.nightcore.util.placeholder.PlaceholderContext.Builder> placeholders) -
of
public static ActionResult of(boolean result, ActionReason reason, su.nightexpress.nightcore.locale.entry.MessageLocale locale, Consumer<su.nightexpress.nightcore.util.placeholder.PlaceholderContext.Builder> placeholders) -
ok
-
ok
-
ok
-
ok
public static ActionResult ok(ActionReason reason, su.nightexpress.nightcore.locale.entry.MessageLocale locale) -
ok
public static ActionResult ok(su.nightexpress.nightcore.locale.entry.MessageLocale locale, Consumer<su.nightexpress.nightcore.util.placeholder.PlaceholderContext.Builder> placeholders) -
ok
public static ActionResult ok(ActionReason reason, su.nightexpress.nightcore.locale.entry.MessageLocale locale, Consumer<su.nightexpress.nightcore.util.placeholder.PlaceholderContext.Builder> placeholders) -
fail
-
fail
-
fail
-
fail
public static ActionResult fail(ActionReason reason, su.nightexpress.nightcore.locale.entry.MessageLocale locale) -
fail
public static ActionResult fail(su.nightexpress.nightcore.locale.entry.MessageLocale locale, Consumer<su.nightexpress.nightcore.util.placeholder.PlaceholderContext.Builder> placeholders) -
fail
public static ActionResult fail(ActionReason reason, su.nightexpress.nightcore.locale.entry.MessageLocale locale, Consumer<su.nightexpress.nightcore.util.placeholder.PlaceholderContext.Builder> placeholders) -
feedback
-
handleFeedback
public boolean handleFeedback(Consumer<su.nightexpress.nightcore.locale.entry.MessageLocale> consumer) -
handleFeedback
public boolean handleFeedback(BiConsumer<su.nightexpress.nightcore.locale.entry.MessageLocale, Consumer<su.nightexpress.nightcore.util.placeholder.PlaceholderContext.Builder>> consumer) -
is
-
success
public boolean success() -
failure
public boolean failure() -
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. -
result
public boolean result()Returns the value of theresultrecord component.- Returns:
- the value of the
resultrecord component
-
reason
Returns the value of thereasonrecord component.- Returns:
- the value of the
reasonrecord component
-
locale
public @Nullable su.nightexpress.nightcore.locale.entry.MessageLocale locale()Returns the value of thelocalerecord component.- Returns:
- the value of the
localerecord component
-
placeholders
public @Nullable Consumer<su.nightexpress.nightcore.util.placeholder.PlaceholderContext.Builder> placeholders()Returns the value of theplaceholdersrecord component.- Returns:
- the value of the
placeholdersrecord component
-