Class TranslationStoreTemplate<K,V>

java.lang.Object
com.atlassian.jira.web.bean.i18n.TranslationStoreTemplate<K,V>
Type Parameters:
K - type parameter for the key
V - type parameter for the value
All Implemented Interfaces:
TranslationStore
Direct Known Subclasses:
ByteArrayBackedStore, CompressedKeyStore

public abstract class TranslationStoreTemplate<K,V> extends Object implements TranslationStore
Templates class for TranslationStore implementations. Subclasses need only implement #makeKeyFromString and #makeValueFromString.
  • Constructor Details

    • TranslationStoreTemplate

      public TranslationStoreTemplate(Map<String,String> map)
  • Method Details

    • get

      public String get(String key)
      Description copied from interface: TranslationStore
      Returns the i18n value associated with a key.
      Specified by:
      get in interface TranslationStore
      Parameters:
      key - a String key
      Returns:
      a String
    • containsKey

      public boolean containsKey(String key)
      Description copied from interface: TranslationStore
      Whether this TranslationStore contains the given key.
      Specified by:
      containsKey in interface TranslationStore
      Parameters:
      key - a String key
      Returns:
      true if this TranslationStore contains the given key
    • keys

      public Iterable<String> keys()
      Description copied from interface: TranslationStore
      Returns an Iterable over this TranslationStore's keys.
      Specified by:
      keys in interface TranslationStore
      Returns:
      an Iterable<String>
    • makeKeyFromString

      protected abstract K makeKeyFromString(String key)
    • makeValueFromString

      protected abstract V makeValueFromString(String value)