java.lang.Object
church.i18n.processing.message.I18nMessage
All Implemented Interfaces:
Serializable

public class I18nMessage extends Object implements Serializable
Message specified by its code that could be a reference to resource bundle; or a raw message that could contain parameters. The message could be localized by ResourceBundle and formatted by MessageFormat.
See Also:
  • Constructor Details

    • I18nMessage

      public I18nMessage(@NotNull @NotNull String code, @Nullable @Nullable Object... params)
      Simple message that can be localized and formatted.
      Parameters:
      code - The code reference in the localization property file; or a raw message that could contain parameters.
      params - Parameters that needs to be provided to properly format the message with all parameters.
  • Method Details

    • getCode

      @NotNull public @NotNull String getCode()
      The code reference in the localization property file; or a raw message that could contain parameters.
      Returns:
      Assigned code value.
    • getMessageParams

      @Nullable public @Nullable Object[] getMessageParams()
      Parameters that needs to be provided to properly format the message with all parameters.
      Returns:
      The array of assigned parameters.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      @NotNull public @NotNull String toString()
      Overrides:
      toString in class Object