Class Mutable<T>

java.lang.Object
io.nflow.engine.workflow.definition.Mutable<T>
Type Parameters:
T - The class of object to be wrapped.

public class Mutable<T> extends Object
Wrapper class to provide mutable object for immutable value.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    The wrapped value.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor.
    Mutable(T val)
    Creates a wrapper for val.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    Returns the wrapped value.
    int
     
    void
    setVal(T val)
    Sets the new value for val.
    Returns the string representation of the val.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • val

      public T val
      The wrapped value.
  • Constructor Details

    • Mutable

      public Mutable()
      Default constructor.
    • Mutable

      public Mutable(T val)
      Creates a wrapper for val.
      Parameters:
      val - Any object to be wrapped.
  • Method Details

    • setVal

      public void setVal(T val)
      Sets the new value for val.
      Parameters:
      val - New value.
    • getVal

      public T getVal()
      Returns the wrapped value.
      Returns:
      Wrapped value.
    • toString

      public String toString()
      Returns the string representation of the val.
      Overrides:
      toString in class Object
      Returns:
      String representation.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object