[New] added IActivityElement.asAction and .asActivity
This commit is contained in:
parent
16b1b727a5
commit
4a72ed8dae
|
@ -483,6 +483,11 @@ public class Activity extends AbstractStrolchRootElement
|
||||||
return this.elements.entrySet().stream();
|
return this.elements.entrySet().stream();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Activity asActivity() {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Long getStart() {
|
public Long getStart() {
|
||||||
long start = Long.MAX_VALUE;
|
long start = Long.MAX_VALUE;
|
||||||
|
|
|
@ -188,4 +188,22 @@ public interface IActivityElement extends StrolchElement {
|
||||||
|
|
||||||
return parent;
|
return parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Casts this {@link IActivityElement} to {@link Activity}
|
||||||
|
*
|
||||||
|
* @return this {@link IActivityElement} as {@link Activity}
|
||||||
|
*/
|
||||||
|
default Activity asActivity() {
|
||||||
|
return (Activity) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Casts this {@link IActivityElement} to {@link Action}
|
||||||
|
*
|
||||||
|
* @return this {@link IActivityElement} as {@link Action}
|
||||||
|
*/
|
||||||
|
default Action asAction() {
|
||||||
|
return (Action) this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue