/** * Factory method to create a synchronized list. * * @param list the list to decorate, must not be null * @throws IllegalArgumentException if list is null */ public static List decorate(List list) { return new SynchronizedList(list); }
/** * Factory method to create a synchronized list. * * @param list the list to decorate, must not be null * @throws IllegalArgumentException if list is null */ public static List decorate(List list) { return new SynchronizedList(list); }
public List subList(int fromIndex, int toIndex) { synchronized (lock) { List list = getList().subList(fromIndex, toIndex); // the lock is passed into the constructor here to ensure that the sublist is // synchronized on the same lock as the parent list return new SynchronizedList(list, lock); } }
public List subList(int fromIndex, int toIndex) { synchronized (lock) { List list = getList().subList(fromIndex, toIndex); // the lock is passed into the constructor here to ensure that the sublist is // synchronized on the same lock as the parent list return new SynchronizedList(list, lock); } }
/** * Factory method to create a synchronized list. * * @param list the list to decorate, must not be null * @throws IllegalArgumentException if list is null */ public static List decorate(List list) { return new SynchronizedList(list); }
/** * Factory method to create a synchronized list. * * @param list the list to decorate, must not be null * @throws IllegalArgumentException if list is null */ public static List decorate(List list) { return new SynchronizedList(list); }
/** * Factory method to create a synchronized list. * * @param list the list to decorate, must not be null * @throws IllegalArgumentException if list is null */ public static List decorate(List list) { return new SynchronizedList(list); }
/** * Factory method to create a synchronized list. * * @param list the list to decorate, must not be null * @throws IllegalArgumentException if list is null */ public static List decorate(List list) { return new SynchronizedList(list); }
/** * Factory method to create a synchronized list. * * @param list the list to decorate, must not be null * @throws IllegalArgumentException if list is null */ public static List decorate(List list) { return new SynchronizedList(list); }
public List subList(int fromIndex, int toIndex) { synchronized (lock) { List list = getList().subList(fromIndex, toIndex); // the lock is passed into the constructor here to ensure that the sublist is // synchronized on the same lock as the parent list return new SynchronizedList(list, lock); } }
public List subList(int fromIndex, int toIndex) { synchronized (lock) { List list = getList().subList(fromIndex, toIndex); // the lock is passed into the constructor here to ensure that the sublist is // synchronized on the same lock as the parent list return new SynchronizedList(list, lock); } }
public List subList(int fromIndex, int toIndex) { synchronized (lock) { List list = getList().subList(fromIndex, toIndex); // the lock is passed into the constructor here to ensure that the sublist is // synchronized on the same lock as the parent list return new SynchronizedList(list, lock); } }
public List subList(int fromIndex, int toIndex) { synchronized (lock) { List list = getList().subList(fromIndex, toIndex); // the lock is passed into the constructor here to ensure that the sublist is // synchronized on the same lock as the parent list return new SynchronizedList(list, lock); } }
public List subList(int fromIndex, int toIndex) { synchronized (lock) { List list = getList().subList(fromIndex, toIndex); // the lock is passed into the constructor here to ensure that the sublist is // synchronized on the same lock as the parent list return new SynchronizedList(list, lock); } }