Class 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 Detail

      • var

        public static <T> Variable<T> var​(java.lang.String name,
                                          java.lang.Class<T> type)
      • 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