Class DualState.SingleGuardedLong<T>

    • Constructor Detail

      • SingleGuardedLong

        protected SingleGuardedLong​(DualState.Key cookie,
                                    T referent,
                                    long resourceOwner,
                                    long guardedLong)
    • Method Detail

      • toString

        public String toString​(Object o)
        Description copied from class: DualState
        Produce a string with such details of this object as might be useful for debugging, starting with an abbreviated form of the class name of the supplied object.

        Subclasses are encouraged to override this and then call it, via super, passing the object unchanged, and then append additional subclass-specific details to the result.

        Because the recursion ends here, this one actually does construct the abbreviated form of the class name of the object, and use it at the start of the returned string.

        Overrides:
        toString in class DualState<T>
        Parameters:
        o - An object whose class name (abbreviated by stripping the package prefix) will be used at the start of the string. Passing null is the same as passing this.
        Returns:
        Description of this state object, prefixed with the abbreviated class name of the passed object.
      • formatString

        protected String formatString()
        Return a printf format string resembling "%s something(%x)" where the %x will be the value being guarded; the "something" should indicate what the value represents, or what will be done with it when released by Java.
      • guardedLong

        protected final long guardedLong()