A
- the type of the two activities being linked togetherpublic class ActivityLink<A extends Activity> extends Object implements Activity
Modifier and Type | Class and Description |
---|---|
static class |
ActivityLink.LinkType
An enumerator listing the available link types.
|
Constructor and Description |
---|
ActivityLink(ActivityRef<A> sourceRef,
ActivityRef<A> targetRef)
Constructs a new activity link with type
ActivityLink.LinkType.END_TO_START . |
ActivityLink(ActivityRef<A> sourceRef,
ActivityRef<A> targetRef,
ActivityLink.LinkType type)
Constructs a new activity link.
|
Modifier and Type | Method and Description |
---|---|
Instant |
getEndTime()
The end time of the activity.
|
String |
getId()
The unique id of the activity.
|
String |
getName()
The name of the activity, for example "Flight 3441".
|
ActivityRef<A> |
getSourceActivityRef()
Returns the activity reference pointing to the source activity of the
link.
|
Instant |
getStartTime()
The start time of the activity.
|
ActivityRef<A> |
getTargetActivityRef()
Returns the activity reference pointing to the target activity of the
link.
|
ActivityLink.LinkType |
getType()
Returns the link type (S-S, S-E, E-S, E-E).
|
Object |
getUserObject()
Returns the (optional) user object of the activity link.
|
void |
setSourceActivityRef(ActivityRef<A> ref)
Sets the activity reference pointing to the source activity of the link.
|
void |
setTargetActivityRef(ActivityRef<A> ref)
Sets the activity reference pointing to the target activity of the link.
|
void |
setType(ActivityLink.LinkType type)
Sets the link type (S-S, S-E, E-S, E-E).
|
void |
setUserObject(Object userObject)
An optional user object that might be useful for creating a custom renderer.
|
public ActivityLink(ActivityRef<A> sourceRef, ActivityRef<A> targetRef, ActivityLink.LinkType type)
sourceRef
- an activity reference pointing to the link sourcetargetRef
- an activity reference pointing to the link targettype
- the type of the link (E-S, S-E, S-S, E-E)public ActivityLink(ActivityRef<A> sourceRef, ActivityRef<A> targetRef)
ActivityLink.LinkType.END_TO_START
.sourceRef
- an activity reference pointing to the link sourcetargetRef
- an activity reference pointing to the link targetpublic void setSourceActivityRef(ActivityRef<A> ref)
ref
- the source activity referencepublic final ActivityRef<A> getSourceActivityRef()
public void setTargetActivityRef(ActivityRef<A> ref)
ref
- the target activity referencepublic final ActivityRef<A> getTargetActivityRef()
public final ActivityLink.LinkType getType()
public void setType(ActivityLink.LinkType type)
type
- the link typepublic String getName()
Activity
public String getId()
Activity
public final Instant getStartTime()
Activity
getStartTime
in interface Activity
public final Instant getEndTime()
Activity
getEndTime
in interface Activity
public final void setUserObject(Object userObject)
userObject
- an optional user objectpublic final Object getUserObject()
Copyright © 2020 Dirk Lemmermann Software & Consulting. All rights reserved.