public PersistentSortedSet<E> clone(boolean uninitialize) { PersistentSortedSet<E> set = new PersistentSortedSet<E>(); if (wasInitialized() && !uninitialize) set.init(getCollection(), null, isDirty()); return set; } }
public E first() { if (!checkInitializedRead()) return null; return getCollection().first(); }
@Override public void addListener(InitializationListener<SortedSet<E>> listener) { persistentSortedSet.addListener(listener); }
@Override protected PersistentCollectionSnapshot createSnapshot(Object io, boolean forReading) { PersistentCollectionSnapshotFactory factory = PersistentCollectionSnapshotFactory.newInstance(io); if (forReading || !wasInitialized()) return factory.newPersistentCollectionSnapshot(true, getDetachedState()); return factory.newPersistentCollectionSnapshot(true, getDetachedState(), isDirty(), getCollection()); }
public PersistentSortedSet(SortedSet<E> collection, boolean clone) { if (collection != null) init(clone ? new TreeSet<E>(collection) : collection, null, false); }
public Comparator<? super E> comparator() { return getCollection().comparator(); }
public static <E> ObservablePersistentSortedSet<E> observablePersistentSortedSet() { return new ObservablePersistentSortedSet<E>(new PersistentSortedSet<E>(true)); }
@Override public boolean wasInitialized() { return persistentSortedSet.wasInitialized(); }
@Override public boolean isDirty() { return persistentSortedSet.isDirty(); }
@Override public void clearDirty() { persistentSortedSet.clearDirty(); }
@Override protected PersistentCollectionSnapshot createSnapshot(Object io, boolean forReading) { PersistentCollectionSnapshotFactory factory = PersistentCollectionSnapshotFactory.newInstance(io); if (forReading || !wasInitialized()) return factory.newPersistentCollectionSnapshot(true, getDetachedState()); return factory.newPersistentCollectionSnapshot(true, getDetachedState(), isDirty(), getCollection()); }
public PersistentSortedSet(SortedSet<E> collection, boolean clone) { if (collection != null) init(clone ? new TreeSet<E>(collection) : collection, null, false); }
public Comparator<? super E> comparator() { return getCollection().comparator(); }
public static <E> ReadOnlySetWrapper<E> readOnlyObservablePersistentSortedSet(Object bean, String name) { return new ReadOnlySetWrapper<E>(bean, name, new ObservablePersistentSortedSet<E>(new PersistentSortedSet<E>(true))); }
public PersistentSortedSet<E> clone(boolean uninitialize) { PersistentSortedSet<E> set = new PersistentSortedSet<E>(); if (wasInitialized() && !uninitialize) set.init(getCollection(), null, isDirty()); return set; } }
public E first() { if (!checkInitializedRead()) return null; return getCollection().first(); }
@Override protected PersistentCollectionSnapshot createSnapshot(Object io, boolean forReading) { PersistentCollectionSnapshotFactory factory = PersistentCollectionSnapshotFactory.newInstance(io); if (forReading || !wasInitialized()) return factory.newPersistentCollectionSnapshot(true, getDetachedState()); return factory.newPersistentCollectionSnapshot(true, getDetachedState(), isDirty(), getCollection()); }
@Override protected void doInitialize() { init(new TreeSet<E>(), null, false); }
public Comparator<? super E> comparator() { return getCollection().comparator(); }
@Override public void addListener(ChangeListener<SortedSet<E>> listener) { persistentSortedSet.addListener(listener); }