Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The following ALH API checks whether a particular object is in a specific state name.
 

Code Block
languagetext

...

boolean inState(Object_ object, String stateName)

...


...

boolean inState(String stateName)

...


...

 

Unless the object is specified, it will use the current active object, for example:

Code Block
languagetext
if (ALH.inState(ccobj, "Operating")) {
	force=ccForce
} else {
	force = acc*2
}

...


Info
titleInformation

Alternatively, you can use ALH API through the fUML object syntax, with object.inState(stateName). For example:

  • ccobj.inState(“Operating”);