Example #1
0
 @Override
 public NavigableSet<E> subSet(
     E fromElement, boolean fromInclusive, E toElement, boolean toInclusive) {
   synchronized (mutex) {
     return Synchronized.navigableSet(
         delegate().subSet(fromElement, fromInclusive, toElement, toInclusive), mutex);
   }
 }
Example #2
0
 @Override
 public NavigableSet<K> navigableKeySet() {
   synchronized (mutex) {
     if (navigableKeySet == null) {
       return navigableKeySet = Synchronized.navigableSet(delegate().navigableKeySet(), mutex);
     }
     return navigableKeySet;
   }
 }
Example #3
0
 @Override
 public NavigableSet<K> descendingKeySet() {
   synchronized (mutex) {
     if (descendingKeySet == null) {
       return descendingKeySet = Synchronized.navigableSet(delegate().descendingKeySet(), mutex);
     }
     return descendingKeySet;
   }
 }
Example #4
0
 @Override
 public NavigableSet<E> descendingSet() {
   synchronized (mutex) {
     if (descendingSet == null) {
       NavigableSet<E> dS = Synchronized.navigableSet(delegate().descendingSet(), mutex);
       descendingSet = dS;
       return dS;
     }
     return descendingSet;
   }
 }
Example #5
0
 @Override
 public NavigableSet<E> tailSet(E fromElement, boolean inclusive) {
   synchronized (mutex) {
     return Synchronized.navigableSet(delegate().tailSet(fromElement, inclusive), mutex);
   }
 }
Example #6
0
 @Override
 public NavigableSet<E> headSet(E toElement, boolean inclusive) {
   synchronized (mutex) {
     return Synchronized.navigableSet(delegate().headSet(toElement, inclusive), mutex);
   }
 }