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 of ModuleConfig, based on a single "mapping" method to be implemented {@link this#getValue(String)}. A FileSystem also needs to be provided to build Path properties.
Author:
Geoffroy Jamgotchian <geoffroy.jamgotchian at rte-france.com>
  • Constructor Details

    • AbstractMapModuleConfig

      protected AbstractMapModuleConfig(FileSystem fs)
      Parameters:
      fs - File system to provide Path objects.
  • Method Details

    • getValue

      protected abstract Object getValue(String propertyName)
      Returns the value of the property with the specified name, or null if it does not exist. The returned object may be a String or directly a more specialized type (Date or Float 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.
    • getOptionalStringProperty

      public Optional<String> getOptionalStringProperty(String name)
    • getOptionalStringListProperty

      public Optional<List<String>> getOptionalStringListProperty(String name)
    • getOptionalIntProperty

      public OptionalInt getOptionalIntProperty(String name)
    • getOptionalLongProperty

      public OptionalLong getOptionalLongProperty(String name)
    • getOptionalFloatProperty

      public Optional<Float> getOptionalFloatProperty(String name)
    • getOptionalDoubleProperty

      public OptionalDouble getOptionalDoubleProperty(String name)
    • getOptionalBooleanProperty

      public Optional<Boolean> getOptionalBooleanProperty(String name)
    • getOptionalDateTimeProperty

      public Optional<ZonedDateTime> getOptionalDateTimeProperty(String name)
    • getOptionalPathProperty

      public Optional<Path> getOptionalPathProperty(String name)
    • getOptionalPathListProperty

      public Optional<List<Path>> getOptionalPathListProperty(String name)