- 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 Asset
getAsset()
Returns the asset of thisAttackStep
object.Steps
getLocalReaches()
Returns the local reaches steps of thisAttackStep
object.Steps
getLocalRequires()
Returns the local requires steps of thisAttackStep
object.Risk
getLocalRisk()
Returns the local risk of thisAttackStep
object.List<String>
getLocalTags()
Returns a list of all local tags in thisAttackStep
object.TtcExpression
getLocalTtc()
Returns the local TTC of thisAttackStep
object.Meta
getMeta()
Returns the meta info of thisAttackStep
object.String
getName()
Returns the name of thisAttackStep
object.List<StepExpression>
getReaches()
Returns the reaches steps of thisAttackStep
object.List<StepExpression>
getRequires()
Returns the requires steps of thisAttackStep
object.Risk
getRisk()
Returns the risk of thisAttackStep
object.AttackStep
getSuperAttackStep()
Returns the super attack step of thisAttackStep
object.List<String>
getTags()
Returns a list of all tags in thisAttackStep
object.TtcExpression
getTtc()
Returns the TTC of thisAttackStep
object.AttackStepType
getType()
Returns the type of thisAttackStep
object.boolean
hasLocalReaches()
Returns whether thisAttackStep
object has local reaches steps.boolean
hasLocalRequires()
Returns whether thisAttackStep
object has local requires steps.boolean
hasLocalRisk()
Returns whether thisAttackStep
object has a local risk.boolean
hasLocalTag(String name)
Returns whethername
is the name of a local tag in thisAttackStep
object.boolean
hasLocalTtc()
Returns whether thisAttackStep
object has a local TTC.boolean
hasRisk()
Returns whether thisAttackStep
object has a risk.boolean
hasSuperAttackStep()
Returns whether thisAttackStep
object has a super attack step.boolean
hasTag(String name)
Returns whethername
is the name of a tag in thisAttackStep
object.boolean
hasTtc()
Returns whether thisAttackStep
object has a TTC.
-
-
-
Method Detail
-
getName
public String getName()
Returns the name of thisAttackStep
object.- Returns:
- the name of this
AttackStep
object - Since:
- 1.0.0
-
getMeta
public Meta getMeta()
Returns the meta info of thisAttackStep
object.- Returns:
- the meta info of this
AttackStep
object - Since:
- 1.0.0
-
getAsset
public Asset getAsset()
Returns the asset of thisAttackStep
object.- Returns:
- the asset of this
AttackStep
object - Since:
- 1.0.0
-
getType
public AttackStepType getType()
Returns the type of thisAttackStep
object.- Returns:
- the type of this
AttackStep
object - Since:
- 1.0.0
-
hasLocalTag
public boolean hasLocalTag(String name)
Returns whethername
is the name of a local tag in thisAttackStep
object.- Parameters:
name
- the name of the local tag- Returns:
- whether
name
is the name of a local tag in thisAttackStep
object - Throws:
NullPointerException
- ifname
isnull
- Since:
- 1.0.0
-
getLocalTags
public List<String> getLocalTags()
Returns a list of all local tags in thisAttackStep
object.- Returns:
- a list of all local tags in this
AttackStep
object - Since:
- 1.0.0
-
hasTag
public boolean hasTag(String name)
Returns whethername
is the name of a tag in thisAttackStep
object.- Parameters:
name
- the name of the tag- Returns:
- whether
name
is the name of a tag in thisAttackStep
object - Throws:
NullPointerException
- ifname
isnull
- Since:
- 1.0.0
-
getTags
public List<String> getTags()
Returns a list of all tags in thisAttackStep
object.- Returns:
- a list of all tags in this
AttackStep
object - Since:
- 1.0.0
-
hasLocalRisk
public boolean hasLocalRisk()
Returns whether thisAttackStep
object has a local risk.- Returns:
- whether this
AttackStep
object has a local risk - Since:
- 1.0.0
-
getLocalRisk
public Risk getLocalRisk()
Returns the local risk of thisAttackStep
object.- Returns:
- the local risk of this
AttackStep
object - Throws:
UnsupportedOperationException
- if thisAttackStep
object does not have a local risk- Since:
- 1.0.0
-
hasRisk
public boolean hasRisk()
Returns whether thisAttackStep
object has a risk.- Returns:
- whether this
AttackStep
object has a risk - Since:
- 1.0.0
-
getRisk
public Risk getRisk()
Returns the risk of thisAttackStep
object.- Returns:
- the risk of this
AttackStep
object - Throws:
UnsupportedOperationException
- if thisAttackStep
object does not have a risk- Since:
- 1.0.0
-
hasLocalTtc
public boolean hasLocalTtc()
Returns whether thisAttackStep
object has a local TTC.- Returns:
- whether this
AttackStep
object has a local TTC - Since:
- 1.0.0
-
getLocalTtc
public TtcExpression getLocalTtc()
Returns the local TTC of thisAttackStep
object.- Returns:
- the local TTC of this
AttackStep
object - Throws:
UnsupportedOperationException
- if thisAttackStep
object does not have a local TTC- Since:
- 1.0.0
-
hasTtc
public boolean hasTtc()
Returns whether thisAttackStep
object has a TTC.- Returns:
- whether this
AttackStep
object has a TTC - Since:
- 1.0.0
-
getTtc
public TtcExpression getTtc()
Returns the TTC of thisAttackStep
object.- Returns:
- the TTC of this
AttackStep
object - Throws:
UnsupportedOperationException
- if thisAttackStep
object does not have a TTC- Since:
- 1.0.0
-
hasLocalRequires
public boolean hasLocalRequires()
Returns whether thisAttackStep
object has local requires steps.- Returns:
- whether this
AttackStep
object has local requires steps - Since:
- 1.0.0
-
getLocalRequires
public Steps getLocalRequires()
Returns the local requires steps of thisAttackStep
object.- Returns:
- the local requires steps of this
AttackStep
object - Throws:
UnsupportedOperationException
- if thisAttackStep
object does not have local requires steps- Since:
- 1.0.0
-
getRequires
public List<StepExpression> getRequires()
Returns the requires steps of thisAttackStep
object.- Returns:
- the requires steps of this
AttackStep
object - Since:
- 1.0.0
-
hasLocalReaches
public boolean hasLocalReaches()
Returns whether thisAttackStep
object has local reaches steps.- Returns:
- whether this
AttackStep
object has local reaches steps - Since:
- 1.0.0
-
getLocalReaches
public Steps getLocalReaches()
Returns the local reaches steps of thisAttackStep
object.- Returns:
- the local reaches steps of this
AttackStep
object - Throws:
UnsupportedOperationException
- if thisAttackStep
object does not have local reaches steps- Since:
- 1.0.0
-
getReaches
public List<StepExpression> getReaches()
Returns the reaches steps of thisAttackStep
object.- Returns:
- the reaches steps of this
AttackStep
object - Since:
- 1.0.0
-
hasSuperAttackStep
public boolean hasSuperAttackStep()
Returns whether thisAttackStep
object has a super attack step.- Returns:
- whether this
AttackStep
object has a super attack step - Since:
- 1.0.0
-
getSuperAttackStep
public AttackStep getSuperAttackStep()
Returns the super attack step of thisAttackStep
object.- Returns:
- the super attack step of this
AttackStep
object - Throws:
UnsupportedOperationException
- if thisAttackStep
object does not have a super attack step- Since:
- 1.0.0
-
-