/** * Factory method to create a synchronized set. * * @param set the set to decorate, must not be null * @throws IllegalArgumentException if set is null */ public static SortedSet decorate(SortedSet set) { return new SynchronizedSortedSet(set); }
/** * Factory method to create a synchronized set. * * @param set the set to decorate, must not be null * @throws IllegalArgumentException if set is null */ public static SortedSet decorate(SortedSet set) { return new SynchronizedSortedSet(set); }
public SortedSet tailSet(Object fromElement) { synchronized (lock) { SortedSet set = getSortedSet().tailSet(fromElement); // the lock is passed into the constructor here to ensure that the // tailset is synchronized on the same lock as the parent return new SynchronizedSortedSet(set, lock); } }
public SortedSet headSet(Object toElement) { synchronized (lock) { SortedSet set = getSortedSet().headSet(toElement); // the lock is passed into the constructor here to ensure that the // headset is synchronized on the same lock as the parent return new SynchronizedSortedSet(set, lock); } }
public SortedSet headSet(Object toElement) { synchronized (lock) { SortedSet set = getSortedSet().headSet(toElement); // the lock is passed into the constructor here to ensure that the // headset is synchronized on the same lock as the parent return new SynchronizedSortedSet(set, lock); } }
public SortedSet tailSet(Object fromElement) { synchronized (lock) { SortedSet set = getSortedSet().tailSet(fromElement); // the lock is passed into the constructor here to ensure that the // tailset is synchronized on the same lock as the parent return new SynchronizedSortedSet(set, lock); } }
public SortedSet subSet(Object fromElement, Object toElement) { synchronized (lock) { SortedSet set = getSortedSet().subSet(fromElement, toElement); // the lock is passed into the constructor here to ensure that the // subset is synchronized on the same lock as the parent return new SynchronizedSortedSet(set, lock); } }
public SortedSet subSet(Object fromElement, Object toElement) { synchronized (lock) { SortedSet set = getSortedSet().subSet(fromElement, toElement); // the lock is passed into the constructor here to ensure that the // subset is synchronized on the same lock as the parent return new SynchronizedSortedSet(set, lock); } }
/** * Factory method to create a synchronized set. * * @param set the set to decorate, must not be null * @throws IllegalArgumentException if set is null */ public static SortedSet decorate(SortedSet set) { return new SynchronizedSortedSet(set); }
/** * Factory method to create a synchronized set. * * @param set the set to decorate, must not be null * @throws IllegalArgumentException if set is null */ public static SortedSet decorate(SortedSet set) { return new SynchronizedSortedSet(set); }
/** * Factory method to create a synchronized set. * * @param set the set to decorate, must not be null * @throws IllegalArgumentException if set is null */ public static SortedSet decorate(SortedSet set) { return new SynchronizedSortedSet(set); }
/** * Factory method to create a synchronized set. * * @param set the set to decorate, must not be null * @throws IllegalArgumentException if set is null */ public static SortedSet decorate(SortedSet set) { return new SynchronizedSortedSet(set); }
public SortedSet headSet(Object toElement) { synchronized (lock) { SortedSet set = getSortedSet().headSet(toElement); // the lock is passed into the constructor here to ensure that the // headset is synchronized on the same lock as the parent return new SynchronizedSortedSet(set, lock); } }
public SortedSet headSet(Object toElement) { synchronized (lock) { SortedSet set = getSortedSet().headSet(toElement); // the lock is passed into the constructor here to ensure that the // headset is synchronized on the same lock as the parent return new SynchronizedSortedSet(set, lock); } }
public SortedSet tailSet(Object fromElement) { synchronized (lock) { SortedSet set = getSortedSet().tailSet(fromElement); // the lock is passed into the constructor here to ensure that the // tailset is synchronized on the same lock as the parent return new SynchronizedSortedSet(set, lock); } }
public SortedSet headSet(Object toElement) { synchronized (lock) { SortedSet set = getSortedSet().headSet(toElement); // the lock is passed into the constructor here to ensure that the // headset is synchronized on the same lock as the parent return new SynchronizedSortedSet(set, lock); } }
public SortedSet tailSet(Object fromElement) { synchronized (lock) { SortedSet set = getSortedSet().tailSet(fromElement); // the lock is passed into the constructor here to ensure that the // tailset is synchronized on the same lock as the parent return new SynchronizedSortedSet(set, lock); } }
public SortedSet headSet(Object toElement) { synchronized (lock) { SortedSet set = getSortedSet().headSet(toElement); // the lock is passed into the constructor here to ensure that the // headset is synchronized on the same lock as the parent return new SynchronizedSortedSet(set, lock); } }
public SortedSet subSet(Object fromElement, Object toElement) { synchronized (lock) { SortedSet set = getSortedSet().subSet(fromElement, toElement); // the lock is passed into the constructor here to ensure that the // subset is synchronized on the same lock as the parent return new SynchronizedSortedSet(set, lock); } }
public SortedSet subSet(Object fromElement, Object toElement) { synchronized (lock) { SortedSet set = getSortedSet().subSet(fromElement, toElement); // the lock is passed into the constructor here to ensure that the // subset is synchronized on the same lock as the parent return new SynchronizedSortedSet(set, lock); } }