Class CMAEntry.Localized

  • Enclosing class:
    CMAEntry

    public class CMAEntry.Localized
    extends java.lang.Object
    Localize all fields with a given locale.

    Please use CMAEntry.localize(String) to see how to create an instance.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T> T getField​(java.lang.String key)
      Get a localized field.
      <T> CMAEntry.Localized setField​(java.lang.String key, T value)
      Change the value of a localized field.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • getField

        public <T> T getField​(java.lang.String key)
        Get a localized field.
        Type Parameters:
        T - the type of the value to be returned.
        Parameters:
        key - the key of the value to be returned.
        Returns:
        a value based on the key given here and the locale set earlier.
      • setField

        public <T> CMAEntry.Localized setField​(java.lang.String key,
                                               T value)
        Change the value of a localized field.
        Type Parameters:
        T - type of the field.
        Parameters:
        key - identifier of the field to be changed.
        value - value of the new field.
        Returns:
        an instance of the calling CMAEntry.Localized instance, for easy chaining.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        Returns:
        a human readable string, representing the object.