Package org.kie.api.fluent

## Class Variable<T>

- java.lang.Object
- - org.kie.api.fluent.Variable<T>

- Type Parameters:
    `T` - data type of the variable

      public class Variable<T>
      extends java.lang.Object

  Builder pattern like class used to build a variable.
  A variable requires a name and a data type.
  Value and metadata are optional.
  Usage:

        Variable.var("test",String.class)
                .value("example value")
                .metadata("readOnly",true).
                .metadata("required",false)

  See Also:
    `NodeContainerBuilder.variable(Variable)`

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.util.Map<java.lang.String,​java.lang.Object>` | `getMetadata()` |
    `java.lang.String` | `getName()` |
    `java.lang.Class<T>` | `getType()` |
    `T` | `getValue()` |
    `Variable<T>` | `metadata​(java.lang.String key, java.lang.Object value)` |
    `java.lang.String` | `toString()` |
    `Variable<T>` | `value​(T value)` |
    `static <T> Variable<T>` | `var​(java.lang.String name, java.lang.Class<T> type)` |

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

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

- - ### Method Detail

    - #### var

          public static <T> Variable<T> var​(java.lang.String name,
                                            java.lang.Class<T> type)

    - #### value

          public Variable<T> value​(T value)

    - #### metadata

          public Variable<T> metadata​(java.lang.String key,
                                      java.lang.Object value)

    - #### getName

          public java.lang.String getName()

    - #### getValue

          public T getValue()

    - #### getType

          public java.lang.Class<T> getType()

    - #### getMetadata

          public java.util.Map<java.lang.String,​java.lang.Object> getMetadata()

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`