Class TntpDemandsReaderSettings
- java.lang.Object
-
- org.goplanit.tntp.converter.demands.TntpDemandsReaderSettings
-
- All Implemented Interfaces:
ConverterReaderSettings
public class TntpDemandsReaderSettings extends Object implements ConverterReaderSettings
Settings for the TNTP demands reader- demand file location: mandatory, no default
- timePeriodDuration: optional, default 1 hour
- Author:
- markr
-
-
Field Summary
Fields Modifier and Type Field Description static Pair<Double,TimeUnits>
DEFAULT_START_TIME_PERIOD_8AM
default start time of time period since midnight is set to 8:00 hoursstatic Pair<Double,TimeUnits>
DEFAULT_TIME_PERIOD_DURATION
default time period duration is set to 1 hour
-
Constructor Summary
Constructors Constructor Description TntpDemandsReaderSettings()
Default constructorTntpDemandsReaderSettings(String demandFileLocation)
ConstructorTntpDemandsReaderSettings(String demandFileLocation, double duration, TimeUnits durationUnit)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDemandFileLocation()
double
getStartTimeSinceMidNight()
TimeUnits
getStartTimeSinceMidNightUnit()
double
getTimePeriodDuration()
TimeUnits
getTimePeriodDurationUnit()
void
logSettings()
Log the current settingsvoid
reset()
be able to reset all settings if neededvoid
setDemandFileLocation(String demandFileLocation)
void
setStartTimeSinceMidnight(Number startTime, TimeUnits startTimeUnit)
void
setTimePeriodDuration(Number duration, TimeUnits durationUnit)
protected boolean
validateSettings()
Validate settings
-
-
-
Constructor Detail
-
TntpDemandsReaderSettings
public TntpDemandsReaderSettings()
Default constructor
-
TntpDemandsReaderSettings
public TntpDemandsReaderSettings(String demandFileLocation)
Constructor- Parameters:
demandFileLocation
- to use
-
-
Method Detail
-
validateSettings
protected boolean validateSettings()
Validate settings- Returns:
- true when valid, false otherwise
-
logSettings
public void logSettings()
Log the current settings- Specified by:
logSettings
in interfaceConverterReaderSettings
-
reset
public void reset()
be able to reset all settings if needed- Specified by:
reset
in interfaceConverterReaderSettings
-
getDemandFileLocation
public String getDemandFileLocation()
-
setDemandFileLocation
public void setDemandFileLocation(String demandFileLocation)
-
getTimePeriodDuration
public double getTimePeriodDuration()
-
getTimePeriodDurationUnit
public TimeUnits getTimePeriodDurationUnit()
-
setStartTimeSinceMidnight
public void setStartTimeSinceMidnight(Number startTime, TimeUnits startTimeUnit)
-
getStartTimeSinceMidNight
public double getStartTimeSinceMidNight()
-
getStartTimeSinceMidNightUnit
public TimeUnits getStartTimeSinceMidNightUnit()
-
-