Package org.eclipse.graphiti.features.impl

# Class Reason

java.lang.Object
org.eclipse.graphiti.features.impl.Reason

All Implemented Interfaces:
  `IReason`

public class Reason extends Object implements IReason
The Class Reason.

## Constructor Summary

Constructors
Constructor
Description
`Reason(boolean b)`
Creates a new `Reason`.
`Reason(boolean b, String reasonText)`
Creates a new `Reason`.

## Method Summary

Modifier and Type
Method
Description
`static IReason`
`createFalseReason()`
Creates the false reason.
`static IReason`
`createFalseReason(String string)`
Creates the false reason.
`static IReason`
`createTrueReason()`
Creates the true reason.
`static IReason`
`createTrueReason(String string)`
Creates the true reason.
`String`
`getText()`
Gets the text.
`void`
`setBool(boolean bool)`
Sets the bool.
`void`
`setText(String reasonText)`
Sets the text.
`boolean`
`toBoolean()`
Converts to boolean.
`String`
`toString()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### Reason

public Reason(boolean b)
Creates a new `Reason`.

Parameters:
  `b` - the bool

### Reason

public Reason(boolean b, String reasonText)
Creates a new `Reason`.

Parameters:
  `b` - the bool
  `reasonText` - the reason text

## Method Details

### createFalseReason

public static IReason createFalseReason()
Creates the false reason.

Returns:
  the i reason

### createFalseReason

public static IReason createFalseReason(String string)
Creates the false reason.

Parameters:
  `string` - the string
Returns:
  the i reason

### createTrueReason

public static IReason createTrueReason()
Creates the true reason.

Returns:
  the i reason

### createTrueReason

public static IReason createTrueReason(String string)
Creates the true reason.

Parameters:
  `string` - the string
Returns:
  the i reason

### getText

public String getText()
Description copied from interface: `IReason`
Gets the text.

Specified by:
  `getText` in interface `IReason`
Returns:
  the reason in words

### setBool

public void setBool(boolean bool)
Sets the bool.

Parameters:
  `bool` - the new bool

### setText

public void setText(String reasonText)
Sets the text.

Parameters:
  `reasonText` - the new text

### toBoolean

public boolean toBoolean()
Description copied from interface: `IReason`
Converts to boolean.

Specified by:
  `toBoolean` in interface `IReason`
Returns:
  true, if to boolean

### toString

public String toString()

Overrides:
  `toString` in class `Object`