/** * Returns a new empty {@link DebugList} which shares the same * {@link ListEventListener} and {@link ReadWriteLock} with this DebugList. * This method is particularly useful when debugging a {@link CompositeList} * where some member lists are DebugLists and thus must share an identical * publisher and locks in order to participate in the CompositeList. */ public <E> DebugList<E> createNewDebugList() { return new DebugList<E>(getPublisher(), debugReadWriteLock); }
/** * Returns a new empty {@link DebugList} which shares the same * {@link ListEventListener} and {@link ReadWriteLock} with this DebugList. * This method is particularly useful when debugging a {@link CompositeList} * where some member lists are DebugLists and thus must share an identical * publisher and locks in order to participate in the CompositeList. */ public <E> DebugList<E> createNewDebugList() { return new DebugList<E>(getPublisher(), debugReadWriteLock); }
/** * Returns a new empty {@link DebugList} which shares the same * {@link ListEventListener} and {@link ReadWriteLock} with this DebugList. * This method is particularly useful when debugging a {@link CompositeList} * where some member lists are DebugLists and thus must share an identical * publisher and locks in order to participate in the CompositeList. */ public <E> DebugList<E> createNewDebugList() { return new DebugList<E>(getPublisher(), debugReadWriteLock); }
public EventList<E> create() { if (Program.isDebug()) { DebugList<E> debugList = new DebugList<E>(); debugList.setLockCheckingEnabled(true); return debugList; } else { return new BasicEventList<E>(); } } public static <E> List<E> safeList(EventList<E> eventList) {