Class PropertyInitializer
- java.lang.Object
-
- ch.sahits.game.openpatrician.clientserverinterface.service.PropertyInitializer
-
- All Implemented Interfaces:
IPropertyInitializer
- Direct Known Subclasses:
DifficultyPropertyInitializer
public abstract class PropertyInitializer extends java.lang.Object implements IPropertyInitializer
- Author:
- Andi Hotz, (c) Sahits GmbH, 2016 Created on May 13, 2016
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringkeySuffixprivate java.util.Propertiesproperties
-
Constructor Summary
Constructors Constructor Description PropertyInitializer(java.lang.String propertyFileName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.lang.StringcomposeKey(java.lang.String baseKey)doublegetDoubleValue(java.lang.String baseKey)Retrieve the double value for the key stored in the backing properties.intgetIntValue(java.lang.String baseKey)Retrieve the integer value for the key stored in the backing properties.java.lang.StringgetValue(java.lang.String baseKey)Retrieve the String value for the key stored in the backing properties.
-
-
-
Method Detail
-
getIntValue
public int getIntValue(java.lang.String baseKey)
Description copied from interface:IPropertyInitializerRetrieve the integer value for the key stored in the backing properties. The key is constructed bybaseKey.suffix, where suffix is defined at construction time.- Specified by:
getIntValuein interfaceIPropertyInitializer- Parameters:
baseKey- base part of the property key- Returns:
- value as an integer.
-
getDoubleValue
public double getDoubleValue(java.lang.String baseKey)
Description copied from interface:IPropertyInitializerRetrieve the double value for the key stored in the backing properties. The key is constructed bybaseKey.suffix, where suffix is defined at construction time.- Specified by:
getDoubleValuein interfaceIPropertyInitializer- Parameters:
baseKey- base part of the property key- Returns:
- value as an double.
-
getValue
public java.lang.String getValue(java.lang.String baseKey)
Description copied from interface:IPropertyInitializerRetrieve the String value for the key stored in the backing properties. The key is constructed bybaseKey.suffix, where suffix is defined at construction time.- Specified by:
getValuein interfaceIPropertyInitializer- Parameters:
baseKey- base part of the property key- Returns:
- value as an String.
-
composeKey
private java.lang.String composeKey(java.lang.String baseKey)
-
-