Class Lockable

    • Constructor Summary

      Constructors 
      Constructor Description
      Lockable()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void check()
      Checks to see if the object has been locked.
      protected void lock()
      Invokes check(), then sets the locked flag.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • check

        protected void check()
        Checks to see if the object has been locked.
        Throws:
        java.lang.IllegalStateException - if lock() has been invoked.
      • lock

        protected void lock()
        Invokes check(), then sets the locked flag. Subsequent calls to check() will fail.