Class TorqueLock<T>

java.lang.Object
org.texastorque.torquelib.control.TorqueLock<T>

public final class TorqueLock<T> extends Object
Lock the state of a value.
  • Constructor Details

    • TorqueLock

      public TorqueLock()
  • Method Details

    • calculate

      public final T calculate(T requested)
      Returns the requested value if not locked, otherwise returns the cached last requested value, the value it was locked at.
    • setLocked

      public final void setLocked(boolean locked)
    • isLocked

      public final boolean isLocked()
    • lock

      public final void lock()
    • unlock

      public final void unlock()
    • getCached

      public T getCached()