## org.opencyc.uml.statemachine
Class Guard

    java.lang.Object
      |
      +--org.opencyc.uml.core.Element
            |
            +--org.opencyc.uml.core.ModelElement
                  |
                  +--org.opencyc.uml.statemachine.Guard

public class Guard
extends org.opencyc.uml.core.ModelElement

Guard from the UML State_Machines package.

Author:
  Stephen L. Reed

  Copyright 2001 Cycorp, Inc., license is open source GNU LGPL.

  the license

  www.opencyc.org

  OpenCyc at SourceForge

  THIS SOFTWARE AND KNOWLEDGE BASE CONTENT ARE PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENCYC ORGANIZATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE AND KNOWLEDGE BASE CONTENT, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Field Summary
`BooleanExpression` `expression` the guard evaluatable expression
`Transition` `transition` the transition to take if the guard expression evaluates to true.

Fields inherited from class org.opencyc.uml.core.ModelElement
`comment, name, namespace`

Constructor Summary
`Guard()` Constucts a new Guard object.

Method Summary
`BooleanExpression` `getexpression()` Gets the guard evaluatable expression.
`Transition` `getTransition()` Gets the transition to take if the guard expression evaluates to true
`void` `setexpression(BooleanExpression expression)` Sets the guard evaluatable expression.
`void` `setTransition(Transition transition)` Sets the transition to take if the guard expression evaluates to true

Methods inherited from class org.opencyc.uml.core.ModelElement
`equals, getComment, getName, getNamespace, setComment, setName, setNamespace, toString`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### expression

    public BooleanExpression expression

  the guard evaluatable expression

### transition

    public Transition transition

  the transition to take if the guard expression evaluates to true.

Constructor Detail

### Guard

    public Guard()

  Constucts a new Guard object.

Method Detail

### getexpression

    public BooleanExpression getexpression()

  Gets the guard evaluatable expression.
  Returns:
    the guard evaluatable expression

### setexpression

    public void setexpression(BooleanExpression expression)

  Sets the guard evaluatable expression.
  Parameters:
    `expression` - the guard evaluatable expression

### getTransition

    public Transition getTransition()

  Gets the transition to take if the guard expression evaluates to true
  Returns:
    the transition to take if the guard expression evaluates to true

### setTransition

    public void setTransition(Transition transition)

  Sets the transition to take if the guard expression evaluates to true
  Parameters:
    `transition` - the transition to take if the guard expression evaluates to true