Record Class InvocationContext.Utility

java.lang.Object
java.lang.Record
io.github.kaktushose.jdac.dispatching.context.InvocationContext.Utility
Record Components:
i18n - The I18n class used by JDA-Commands
messageResolver - The MessageResolver class used by JDA-Commands
Enclosing class:
InvocationContext<T extends GenericInteractionCreateEvent>

public static record InvocationContext.Utility(I18n i18n, MessageResolver messageResolver) extends Record
An object providing access to some framework functionality.
  • Constructor Details

    • Utility

      public Utility(I18n i18n, MessageResolver messageResolver)
      Creates an instance of a Utility record class.
      Parameters:
      i18n - the value for the i18n record component
      messageResolver - the value for the messageResolver record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • i18n

      public I18n i18n()
      Returns the value of the i18n record component.
      Returns:
      the value of the i18n record component
    • messageResolver

      public MessageResolver messageResolver()
      Returns the value of the messageResolver record component.
      Returns:
      the value of the messageResolver record component