コード例 #1
0
 /**
  * Returns a string identifying this latch, as well as its state. The state, in brackets, includes
  * the String {@code "Count ="} followed by the current count.
  *
  * @return a string identifying this latch, as well as its state
  */
 public String toString() {
   return super.toString() + "[Count = " + sync.getCount() + "]";
 }
コード例 #2
0
 /**
  * Returns the current count.
  *
  * <p>This method is typically used for debugging and testing purposes.
  *
  * @return the current count
  */
 public long getCount() {
   return sync.getCount();
 }