Package com.powsybl.commons.config
Class AbstractMapModuleConfig
- java.lang.Object
-
- com.powsybl.commons.config.AbstractModuleConfig
-
- com.powsybl.commons.config.AbstractMapModuleConfig
-
- All Implemented Interfaces:
ModuleConfig
- Direct Known Subclasses:
MapModuleConfig
public abstract class AbstractMapModuleConfig extends AbstractModuleConfig
Provides implementation for most methods ofModuleConfig
, based on a single "mapping" method to be implemented {@link this#getValue(String)}. AFileSystem
also needs to be provided to buildPath
properties.- Author:
- Geoffroy Jamgotchian
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractMapModuleConfig(FileSystem fs)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Optional<Boolean>
getOptionalBooleanProperty(String name)
Optional<org.joda.time.DateTime>
getOptionalDateTimeProperty(String name)
OptionalDouble
getOptionalDoubleProperty(String name)
Optional<Float>
getOptionalFloatProperty(String name)
OptionalInt
getOptionalIntProperty(String name)
OptionalLong
getOptionalLongProperty(String name)
Optional<List<Path>>
getOptionalPathListProperty(String name)
Optional<Path>
getOptionalPathProperty(String name)
Optional<List<String>>
getOptionalStringListProperty(String name)
Optional<String>
getOptionalStringProperty(String name)
protected abstract Object
getValue(String propertyName)
Returns the value of the property with the specified name, ornull
if it does not exist.-
Methods inherited from class com.powsybl.commons.config.AbstractModuleConfig
getBooleanProperty, getBooleanProperty, getClassProperty, getClassProperty, getDateTimeProperty, getDoubleProperty, getDoubleProperty, getEnumProperty, getEnumProperty, getEnumSetProperty, getEnumSetProperty, getFloatProperty, getFloatProperty, getIntervalProperty, getIntProperty, getIntProperty, getLongProperty, getLongProperty, getOptionalClassProperty, getOptionalEnumProperty, getOptionalEnumSetProperty, getOptionalIntervalProperty, getPathListProperty, getPathProperty, getPathProperty, getStringListProperty, getStringListProperty, getStringProperty, getStringProperty
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.powsybl.commons.config.ModuleConfig
getPropertyNames, hasProperty
-
-
-
-
Constructor Detail
-
AbstractMapModuleConfig
protected AbstractMapModuleConfig(FileSystem fs)
- Parameters:
fs
- File system to providePath
objects.
-
-
Method Detail
-
getValue
protected abstract Object getValue(String propertyName)
Returns the value of the property with the specified name, ornull
if it does not exist. The returned object may be aString
or directly a more specialized type (Date
orFloat
for instance).- Parameters:
propertyName
- The name of the property to be looked up- Returns:
- The value of the specified property it it exists,
null
otherwise.
-
getOptionalStringListProperty
public Optional<List<String>> getOptionalStringListProperty(String name)
-
getOptionalIntProperty
public OptionalInt getOptionalIntProperty(String name)
-
getOptionalLongProperty
public OptionalLong getOptionalLongProperty(String name)
-
getOptionalDoubleProperty
public OptionalDouble getOptionalDoubleProperty(String name)
-
getOptionalDateTimeProperty
public Optional<org.joda.time.DateTime> getOptionalDateTimeProperty(String name)
-
-