public abstract class AbstractMapModuleConfig extends AbstractModuleConfig
ModuleConfig
,
based on a single "mapping" method to be implemented this#getValue(String)
.
A FileSystem
also needs to be provided to build Path
properties.Modifier | Constructor and Description |
---|---|
protected |
AbstractMapModuleConfig(FileSystem fs) |
Modifier and Type | Method and 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, or
null if it does not exist. |
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPropertyNames, hasProperty
protected AbstractMapModuleConfig(FileSystem fs)
fs
- File system to provide Path
objects.protected abstract Object getValue(String propertyName)
null
if it does not exist.
The returned object may be a String
or directly a more specialized type
(Date
or Float
for instance).propertyName
- The name of the property to be looked upnull
otherwise.public Optional<List<String>> getOptionalStringListProperty(String name)
public OptionalInt getOptionalIntProperty(String name)
public OptionalLong getOptionalLongProperty(String name)
public OptionalDouble getOptionalDoubleProperty(String name)
public Optional<org.joda.time.DateTime> getOptionalDateTimeProperty(String name)
Copyright © 2020. All rights reserved.