All Known Subinterfaces:
Option

public interface Label
Label container interface for providing language dependent labels.
Since:
4.0.30
  • Method Summary

    Modifier and Type
    Method
    Description
    getLabel(Language language)
    Try getting a label in the following order: the label for the specified language; the label for the fallback language; the value itself.
    Convenience method to get a label based on a language abbreviation.
    void
    putLabel(Language language, String label)
    Set the label for the specified language.
    void
    putLabel(String lang, String label)
    Convenience method to put a label based on a language abbreviation.
  • Method Details

    • getLabel

      @ApiDoc(comment="Try getting a label.", since="4.0.30") String getLabel(Language language)
      Try getting a label in the following order:
      1. the label for the specified language;
      2. the label for the fallback language;
      3. the value itself.
      Parameters:
      language - The language to look up.
      Returns:
      The label.
      Since:
      4.0.30
    • getLabel

      @ApiDoc(comment="Convenience method to get a label based on a language abbreviation.", since="4.0.30") String getLabel(String lang)
      Convenience method to get a label based on a language abbreviation.
      Parameters:
      lang - The language abbreviation.
      Returns:
      The label.
      Since:
      4.0.30
      See Also:
    • putLabel

      @ApiDoc(comment="Set the label for the specified language.", since="4.0.30") void putLabel(Language language, String label)
      Set the label for the specified language.
      Parameters:
      language - The language to store in.
      label - The label to store.
      Since:
      4.0.30
    • putLabel

      @ApiDoc(comment="Convenience method to put a label based on a language abbreviation.", since="4.0.30") void putLabel(String lang, String label)
      Convenience method to put a label based on a language abbreviation.
      Parameters:
      lang - The language abbreviation.
      label - The label to store.
      Since:
      4.0.30