Record Class Localization

java.lang.Object
java.lang.Record
net.flectone.pulse.config.Localization

public record Localization(String language, String cooldown, Localization.Time time, Localization.Command command, Localization.Integration integration, Localization.Message message) extends Record
Configuration for localization in FlectonePulse. Contains all translatable strings for commands, messages, and integrations.
Since:
1.7.1
  • Field Details

  • Constructor Details

    • Localization

      public Localization(String language, @JsonPropertyDescription(" https://flectone.net/pulse/docs/message") String cooldown, Localization.Time time, @JsonPropertyDescription(" https://flectone.net/pulse/docs/command") Localization.Command command, @JsonPropertyDescription(" https://flectone.net/pulse/docs/integration") Localization.Integration integration, @JsonPropertyDescription(" https://flectone.net/pulse/docs/message") Localization.Message message)
      Creates an instance of a Localization record class.
      Parameters:
      language - the value for the language record component
      cooldown - the value for the cooldown record component
      time - the value for the time record component
      command - the value for the command record component
      integration - the value for the integration record component
      message - the value for the message record component
  • Method Details

    • builder

      public static Localization.LocalizationBuilder builder()
    • toBuilder

    • withLanguage

      public Localization withLanguage(String language)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withCooldown

      public Localization withCooldown(String cooldown)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withTime

      public Localization withTime(Localization.Time time)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withCommand

      public Localization withCommand(Localization.Command command)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withIntegration

      public Localization withIntegration(Localization.Integration integration)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withMessage

      public Localization withMessage(Localization.Message message)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • 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.
    • language

      public String language()
      Returns the value of the language record component.
      Returns:
      the value of the language record component
    • cooldown

      @JsonPropertyDescription(" https://flectone.net/pulse/docs/message") public String cooldown()
      Returns the value of the cooldown record component.
      Returns:
      the value of the cooldown record component
    • time

      public Localization.Time time()
      Returns the value of the time record component.
      Returns:
      the value of the time record component
    • command

      @JsonPropertyDescription(" https://flectone.net/pulse/docs/command") public Localization.Command command()
      Returns the value of the command record component.
      Returns:
      the value of the command record component
    • integration

      @JsonPropertyDescription(" https://flectone.net/pulse/docs/integration") public Localization.Integration integration()
      Returns the value of the integration record component.
      Returns:
      the value of the integration record component
    • message

      @JsonPropertyDescription(" https://flectone.net/pulse/docs/message") public Localization.Message message()
      Returns the value of the message record component.
      Returns:
      the value of the message record component