Ejemplo n.º 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);
   }
 }
Ejemplo n.º 2
0
 @Override
 public NavigableSet<K> navigableKeySet() {
   synchronized (mutex) {
     if (navigableKeySet == null) {
       return navigableKeySet = Synchronized.navigableSet(delegate().navigableKeySet(), mutex);
     }
     return navigableKeySet;
   }
 }
Ejemplo n.º 3
0
 @Override
 public NavigableSet<K> descendingKeySet() {
   synchronized (mutex) {
     if (descendingKeySet == null) {
       return descendingKeySet = Synchronized.navigableSet(delegate().descendingKeySet(), mutex);
     }
     return descendingKeySet;
   }
 }
Ejemplo n.º 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;
   }
 }
Ejemplo n.º 5
0
 @Override
 public NavigableSet<E> tailSet(E fromElement, boolean inclusive) {
   synchronized (mutex) {
     return Synchronized.navigableSet(delegate().tailSet(fromElement, inclusive), mutex);
   }
 }
Ejemplo n.º 6
0
 @Override
 public NavigableSet<E> headSet(E toElement, boolean inclusive) {
   synchronized (mutex) {
     return Synchronized.navigableSet(delegate().headSet(toElement, inclusive), mutex);
   }
 }