652 |
|
} |
653 |
|
|
654 |
|
/** |
655 |
< |
* Returns a string identifying this semaphore, as well as the number of permits. |
656 |
< |
* @return a string identifying this semaphore, as well as the number of permits. |
655 |
> |
* Returns a string identifying this semaphore, as well its state. |
656 |
> |
* The state, in brackets, includes the String |
657 |
> |
* "Permits =" followed by the number of permits. |
658 |
> |
* @return a string identifying this semaphore, as well as its |
659 |
> |
* state |
660 |
|
*/ |
661 |
|
public String toString() { |
662 |
|
return super.toString() + "[Permits = " + sync.getPermits() + "]"; |