Class LocalizedString.ExpressionTranslation

java.lang.Object
com.lokalized.LocalizedString.PlaceholderDefinition
com.lokalized.LocalizedString.ExpressionTranslation
Enclosing class:
LocalizedString

A generated fragment with a required default translation and optional ordered expression-driven alternatives.

The first alternative whose expression matches supplies the fragment. If none match, the default translation is used. The one-argument constructor creates a translation-only scoped fragment.

Since:
3.0.0
Author:
Mark Allen
  • Constructor Details

  • Method Details

    • toString

      Generates a String representation of this object.
      Overrides:
      toString in class Object
      Returns:
      a string representation of this object, not null
    • equals

      public boolean equals(@Nullable Object other)
      Checks if this object is equal to another one.
      Overrides:
      equals in class Object
      Parameters:
      other - the object to check, null returns false
      Returns:
      true if this is equal to the other object, false otherwise
    • hashCode

      public int hashCode()
      A hash code for this object.
      Overrides:
      hashCode in class Object
      Returns:
      a suitable hash code
    • getTranslation

      Gets the default fragment translation.
      Returns:
      the default fragment translation, not null
    • getAlternatives

      Gets the ordered expression-driven alternatives.
      Returns:
      the ordered expression-driven alternatives, empty for a translation-only fragment, not null