- java.lang.Object
-
- org.mal_lang.langspec.AttackStep
-
public final class AttackStep extends Object
Immutable class representing an attack step of an asset in a MAL language.- Since:
- 1.0.0
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AssetgetAsset()Returns the asset of thisAttackStepobject.StepsgetLocalReaches()Returns the local reaches steps of thisAttackStepobject.StepsgetLocalRequires()Returns the local requires steps of thisAttackStepobject.RiskgetLocalRisk()Returns the local risk of thisAttackStepobject.List<String>getLocalTags()Returns a list of all local tags in thisAttackStepobject.TtcExpressiongetLocalTtc()Returns the local TTC of thisAttackStepobject.MetagetMeta()Returns the meta info of thisAttackStepobject.StringgetName()Returns the name of thisAttackStepobject.List<StepExpression>getReaches()Returns the reaches steps of thisAttackStepobject.List<StepExpression>getRequires()Returns the requires steps of thisAttackStepobject.RiskgetRisk()Returns the risk of thisAttackStepobject.AttackStepgetSuperAttackStep()Returns the super attack step of thisAttackStepobject.List<String>getTags()Returns a list of all tags in thisAttackStepobject.TtcExpressiongetTtc()Returns the TTC of thisAttackStepobject.AttackStepTypegetType()Returns the type of thisAttackStepobject.booleanhasLocalReaches()Returns whether thisAttackStepobject has local reaches steps.booleanhasLocalRequires()Returns whether thisAttackStepobject has local requires steps.booleanhasLocalRisk()Returns whether thisAttackStepobject has a local risk.booleanhasLocalTag(String name)Returns whethernameis the name of a local tag in thisAttackStepobject.booleanhasLocalTtc()Returns whether thisAttackStepobject has a local TTC.booleanhasRisk()Returns whether thisAttackStepobject has a risk.booleanhasSuperAttackStep()Returns whether thisAttackStepobject has a super attack step.booleanhasTag(String name)Returns whethernameis the name of a tag in thisAttackStepobject.booleanhasTtc()Returns whether thisAttackStepobject has a TTC.
-
-
-
Method Detail
-
getName
public String getName()
Returns the name of thisAttackStepobject.- Returns:
- the name of this
AttackStepobject - Since:
- 1.0.0
-
getMeta
public Meta getMeta()
Returns the meta info of thisAttackStepobject.- Returns:
- the meta info of this
AttackStepobject - Since:
- 1.0.0
-
getAsset
public Asset getAsset()
Returns the asset of thisAttackStepobject.- Returns:
- the asset of this
AttackStepobject - Since:
- 1.0.0
-
getType
public AttackStepType getType()
Returns the type of thisAttackStepobject.- Returns:
- the type of this
AttackStepobject - Since:
- 1.0.0
-
hasLocalTag
public boolean hasLocalTag(String name)
Returns whethernameis the name of a local tag in thisAttackStepobject.- Parameters:
name- the name of the local tag- Returns:
- whether
nameis the name of a local tag in thisAttackStepobject - Throws:
NullPointerException- ifnameisnull- Since:
- 1.0.0
-
getLocalTags
public List<String> getLocalTags()
Returns a list of all local tags in thisAttackStepobject.- Returns:
- a list of all local tags in this
AttackStepobject - Since:
- 1.0.0
-
hasTag
public boolean hasTag(String name)
Returns whethernameis the name of a tag in thisAttackStepobject.- Parameters:
name- the name of the tag- Returns:
- whether
nameis the name of a tag in thisAttackStepobject - Throws:
NullPointerException- ifnameisnull- Since:
- 1.0.0
-
getTags
public List<String> getTags()
Returns a list of all tags in thisAttackStepobject.- Returns:
- a list of all tags in this
AttackStepobject - Since:
- 1.0.0
-
hasLocalRisk
public boolean hasLocalRisk()
Returns whether thisAttackStepobject has a local risk.- Returns:
- whether this
AttackStepobject has a local risk - Since:
- 1.0.0
-
getLocalRisk
public Risk getLocalRisk()
Returns the local risk of thisAttackStepobject.- Returns:
- the local risk of this
AttackStepobject - Throws:
UnsupportedOperationException- if thisAttackStepobject does not have a local risk- Since:
- 1.0.0
-
hasRisk
public boolean hasRisk()
Returns whether thisAttackStepobject has a risk.- Returns:
- whether this
AttackStepobject has a risk - Since:
- 1.0.0
-
getRisk
public Risk getRisk()
Returns the risk of thisAttackStepobject.- Returns:
- the risk of this
AttackStepobject - Throws:
UnsupportedOperationException- if thisAttackStepobject does not have a risk- Since:
- 1.0.0
-
hasLocalTtc
public boolean hasLocalTtc()
Returns whether thisAttackStepobject has a local TTC.- Returns:
- whether this
AttackStepobject has a local TTC - Since:
- 1.0.0
-
getLocalTtc
public TtcExpression getLocalTtc()
Returns the local TTC of thisAttackStepobject.- Returns:
- the local TTC of this
AttackStepobject - Throws:
UnsupportedOperationException- if thisAttackStepobject does not have a local TTC- Since:
- 1.0.0
-
hasTtc
public boolean hasTtc()
Returns whether thisAttackStepobject has a TTC.- Returns:
- whether this
AttackStepobject has a TTC - Since:
- 1.0.0
-
getTtc
public TtcExpression getTtc()
Returns the TTC of thisAttackStepobject.- Returns:
- the TTC of this
AttackStepobject - Throws:
UnsupportedOperationException- if thisAttackStepobject does not have a TTC- Since:
- 1.0.0
-
hasLocalRequires
public boolean hasLocalRequires()
Returns whether thisAttackStepobject has local requires steps.- Returns:
- whether this
AttackStepobject has local requires steps - Since:
- 1.0.0
-
getLocalRequires
public Steps getLocalRequires()
Returns the local requires steps of thisAttackStepobject.- Returns:
- the local requires steps of this
AttackStepobject - Throws:
UnsupportedOperationException- if thisAttackStepobject does not have local requires steps- Since:
- 1.0.0
-
getRequires
public List<StepExpression> getRequires()
Returns the requires steps of thisAttackStepobject.- Returns:
- the requires steps of this
AttackStepobject - Since:
- 1.0.0
-
hasLocalReaches
public boolean hasLocalReaches()
Returns whether thisAttackStepobject has local reaches steps.- Returns:
- whether this
AttackStepobject has local reaches steps - Since:
- 1.0.0
-
getLocalReaches
public Steps getLocalReaches()
Returns the local reaches steps of thisAttackStepobject.- Returns:
- the local reaches steps of this
AttackStepobject - Throws:
UnsupportedOperationException- if thisAttackStepobject does not have local reaches steps- Since:
- 1.0.0
-
getReaches
public List<StepExpression> getReaches()
Returns the reaches steps of thisAttackStepobject.- Returns:
- the reaches steps of this
AttackStepobject - Since:
- 1.0.0
-
hasSuperAttackStep
public boolean hasSuperAttackStep()
Returns whether thisAttackStepobject has a super attack step.- Returns:
- whether this
AttackStepobject has a super attack step - Since:
- 1.0.0
-
getSuperAttackStep
public AttackStep getSuperAttackStep()
Returns the super attack step of thisAttackStepobject.- Returns:
- the super attack step of this
AttackStepobject - Throws:
UnsupportedOperationException- if thisAttackStepobject does not have a super attack step- Since:
- 1.0.0
-
-