Package org.goplanit.demands
Class TimePeriodsFactory
- java.lang.Object
-
- org.goplanit.utils.id.ManagedIdEntityFactoryImpl<TimePeriod>
-
- org.goplanit.demands.TimePeriodsFactory
-
- All Implemented Interfaces:
ManagedIdEntityFactory<TimePeriod>
public class TimePeriodsFactory extends ManagedIdEntityFactoryImpl<TimePeriod> implements ManagedIdEntityFactory<TimePeriod>
Factory class for time periods instances to be registered on its parent container passed in to constructor
-
-
Field Summary
Fields Modifier and Type Field Description protected TimePeriods
timePeriods
container to use-
Fields inherited from class org.goplanit.utils.id.ManagedIdEntityFactoryImpl
groupIdToken
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
TimePeriodsFactory(IdGroupingToken tokenId, TimePeriods timePeriods)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected TimePeriodImpl
createNew(long startTimeSeconds, long durationSeconds)
Create a newly created instance without registering on the containerTimePeriod
registerNew(long startTimeSeconds, long durationSeconds)
register a new entry on the container and return itTimePeriod
registerNew(String description, long startTimeSeconds, long durationSeconds)
register a new entry on the container and return it-
Methods inherited from class org.goplanit.utils.id.ManagedIdEntityFactoryImpl
createUniqueDeepCopyOf, createUniqueShallowCopyOf, getIdGroupingToken, setIdGroupingToken
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.goplanit.utils.id.ManagedIdEntityFactory
createUniqueDeepCopyOf, createUniqueShallowCopyOf, getIdGroupingToken, setIdGroupingToken
-
-
-
-
Field Detail
-
timePeriods
protected final TimePeriods timePeriods
container to use
-
-
Constructor Detail
-
TimePeriodsFactory
protected TimePeriodsFactory(IdGroupingToken tokenId, TimePeriods timePeriods)
Constructor- Parameters:
tokenId
- to usetimePeriods
- to use
-
-
Method Detail
-
createNew
protected TimePeriodImpl createNew(long startTimeSeconds, long durationSeconds)
Create a newly created instance without registering on the container- Parameters:
startTimeSeconds
- start time in seconds from midnightdurationSeconds
- duration of time period in seconds- Returns:
- created time period
-
registerNew
public TimePeriod registerNew(String description, long startTimeSeconds, long durationSeconds)
register a new entry on the container and return it- Parameters:
description
- for the time periodstartTimeSeconds
- start time in seconds since midnightdurationSeconds
- duration in seconds- Returns:
- created instance
-
registerNew
public TimePeriod registerNew(long startTimeSeconds, long durationSeconds)
register a new entry on the container and return it- Parameters:
startTimeSeconds
- start time in seconds since midnightdurationSeconds
- duration in seconds- Returns:
- created time period
-
-