com.atlassian.jira.web.bean.i18n
Class TranslationStoreTemplate<K,V>

java.lang.Object
  extended by 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 Summary
TranslationStoreTemplate(Map<String,String> map)
           
 
Method Summary
 boolean containsKey(String key)
          Whether this TranslationStore contains the given key.
 String get(String key)
          Returns the i18n value associated with a key.
 Iterable<String> keys()
          Returns an Iterable over this TranslationStore's keys.
protected abstract  K makeKeyFromString(String key)
           
protected abstract  V makeValueFromString(String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TranslationStoreTemplate

public TranslationStoreTemplate(Map<String,String> map)
Method Detail

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)


Copyright © 2002-2014 Atlassian. All Rights Reserved.