org.syphr.prom
Interface Translator<T>

Type Parameters:
T - the type of objects used to defined the property keys

public interface Translator<T>

This interface defines the functionality required to translate back and forth between key constants (Enums) and property names.

It is required that any implementation be thread safe.

Author:
Gregory P. Moyer

Method Summary
 T getPropertyKey(String propertyName)
          This method translates the string property name into an key object that is used to reference the property via the properties management API.
 String getPropertyName(T propertyKey)
          This method translates the key object into a string property name that is used in the properties file.
 

Method Detail

getPropertyName

String getPropertyName(T propertyKey)
This method translates the key object into a string property name that is used in the properties file. There is not likely to be a need for client code to call this method directly. The PropertiesManager API will take care of reading and writing the actual file.

Parameters:
propertyKey - the key object to be translated into a property name
Returns:
the name that represents this property in the properties file

getPropertyKey

T getPropertyKey(String propertyName)
This method translates the string property name into an key object that is used to reference the property via the properties management API. There is not likely to be a need for client code to call this method directly. The PropertiesManager API will take care of reading and writing the actual file.

Parameters:
propertyName - the property name to be translated into an key object
Returns:
the associated key object


Copyright © 2010-2011 Gregory P. Moyer. All Rights Reserved.