T
- the object type of the timeline objectsS
- the granularity type (e.g. TimeGranularity.HOURS)public interface IConstraint<T,S extends IGranularity> extends IRelationship<T>
Modifier and Type | Method and Description |
---|---|
int |
getBufferDuration()
Returns the duration of the buffer.
|
S |
getBufferGranularity()
Returns the buffer granularity (days, hours, weeks).
|
BufferType |
getBufferType()
Returns the buffer type (=, <=, <, >, >=).
|
ConstraintType |
getConstraintType()
Returns the
ConstraintType which determines if the constraint is
a hard or a soft constraint. |
Violation |
getViolation(long time1,
long time2)
Checks whether a violation of the constraint exists for the given two
time points.
|
void |
setBufferDuration(int duration)
Sets the duration of the buffer.
|
void |
setBufferGranularity(S granularity)
Sets the buffer granularity (days, hours, weeks).
|
void |
setBufferType(BufferType type)
Sets the buffer type (=, <=, <, >, >=).
|
void |
setConstraintType(ConstraintType type)
Sets the
ConstraintType which determines if the constraint is a
hard or a soft constraint. |
getLabel, getPopupObject, getPopupTitleObject, getSourcePath, getTargetPath, getType, isDeletable, isSelectable, setSourcePath, setTargetPath, setType
Violation getViolation(long time1, long time2)
RelationshipType.END_TO_START
then
time1
will be the end time of the first timeline
object and time2
will be the start time of the second
timeline object.RelationshipType.END_TO_END
then
time1
will be the end time of the first timeline
object and time2
will be the end time of the second
timeline object.RelationshipType.START_TO_START
then
time1
will be the start time of the first timeline
object and time2
will be the start time of the second
timeline object.RelationshipType.START_TO_END
then
time1
will be the start time of the first timeline
object and time2
will be the end time of the second
timeline object.time1
- time2
- ConstraintType getConstraintType()
ConstraintType
which determines if the constraint is
a hard or a soft constraint.void setConstraintType(ConstraintType type)
ConstraintType
which determines if the constraint is a
hard or a soft constraint.type
- the constraint typeBufferType getBufferType()
void setBufferType(BufferType type)
type
- the buffer typeS getBufferGranularity()
void setBufferGranularity(S granularity)
granularity
- the buffer granularityint getBufferDuration()
void setBufferDuration(int duration)
duration
- the buffer durationCopyright © 2006–2016 Dirk Lemmermann Software & Consulting. All rights reserved.