Class LocalizedString

java.lang.Object
org.bedework.timezones.common.db.TzDbentity<LocalizedString>
org.bedework.timezones.common.db.LocalizedString
All Implemented Interfaces:
Serializable, Comparable<LocalizedString>

public class LocalizedString extends TzDbentity<LocalizedString>
.
Version:
1.0
See Also:
  • Constructor Details

    • LocalizedString

      public LocalizedString()
      Constructor
    • LocalizedString

      public LocalizedString(String lang, String value)
      Create a string by specifying all its fields
      Parameters:
      lang - String language code
      value - String value
  • Method Details

    • setLang

      public void setLang(String val)
      Set the lang
      Parameters:
      val - String lang
    • getLang

      public String getLang()
      Get the lang
      Returns:
      String lang
    • setValue

      public void setValue(String val)
      Set the value
      Parameters:
      val - String value
    • getValue

      public String getValue()
      Get the value
      Returns:
      String value
    • findLang

      protected static LocalizedString findLang(String lang, Collection<? extends LocalizedString> c)
      Search the collection for a string that matches the given language code.
      Parameters:
      lang -
      c -
      Returns:
      LocalizedString or null if no strings.
    • update

      public boolean update(LocalizedString from)
      Figure out what's different and update it. This should reduce the number of spurious changes to the db.
      Parameters:
      from -
      Returns:
      true if we changed something.
    • checkNulls

      public boolean checkNulls()
      Check this is properly trimmed
      Returns:
      boolean true if changed
    • compareTo

      public int compareTo(LocalizedString that)
      Specified by:
      compareTo in interface Comparable<LocalizedString>
      Overrides:
      compareTo in class TzDbentity<LocalizedString>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class TzDbentity<LocalizedString>
    • toStringSegment

      protected void toStringSegment(org.bedework.util.misc.ToString ts)
      Description copied from class: TzDbentity
      Add our stuff to the ToString builder
      Overrides:
      toStringSegment in class TzDbentity<LocalizedString>
      Parameters:
      ts - for result
    • clone

      public Object clone()
      Description copied from class: TzDbentity
      Make visible
      Overrides:
      clone in class TzDbentity<LocalizedString>
      Returns:
      Object of class T