コード例 #1
0
    /**
     * Marks key as unlocked.
     *
     * @param key Key.
     * @return {@code True} if last locked key was unlocked.
     */
    boolean unlocked(Object key) {
      locked.remove(key);

      return locked.isEmpty();
    }
コード例 #2
0
 /**
  * Marks key as locked.
  *
  * @param key Key.
  */
 void locked(Object key) {
   locked.add(key);
 }