public PersistentSortedSet(SortedSet<E> collection, boolean clone) { if (collection != null) init(clone ? new TreeSet<E>(collection) : collection, null, false); }
public PersistentSortedSet(SortedSet<E> collection, boolean clone) { if (collection != null) init(clone ? new TreeSet<E>(collection) : collection, null, false); }
@Override protected void doInitialize() { init(new TreeSet<E>(), null, false); }
public PersistentSortedSet(SortedSet<E> collection, boolean clone) { if (collection != null) init(clone ? new TreeSet<E>(collection) : collection, null, false); }
@Override protected void doInitialize(SortedSet<E> sortedSet, boolean empty) { init(empty ? new TreeSet<E>(sortedSet.comparator()) : sortedSet, null, false); }
@Override protected void doInitialize(SortedSet<E> sortedSet, boolean empty) { init(empty ? new TreeSet<E>(sortedSet.comparator()) : sortedSet, null, false); }
@SuppressWarnings("unchecked") @Override protected void updateFromSnapshot(ObjectInput in, PersistentCollectionSnapshot snapshot) { if (snapshot.isInitialized()) { Comparator<? super E> comparator = null; try { comparator = snapshot.newComparator(in); } catch (Exception e) { throw new RuntimeException("Could not create instance of comparator", e); } SortedSet<E> set = new TreeSet<E>(comparator); set.addAll((Collection<? extends E>)snapshot.getElementsAsCollection()); init(set, snapshot.getDetachedState(), snapshot.isDirty()); } else init(null, snapshot.getDetachedState(), false); }
@SuppressWarnings("unchecked") @Override protected void updateFromSnapshot(ObjectInput in, PersistentCollectionSnapshot snapshot) { if (snapshot.isInitialized()) { Comparator<? super E> comparator = null; try { comparator = snapshot.newComparator(in); } catch (Exception e) { throw new RuntimeException("Could not create instance of comparator", e); } SortedSet<E> set = new TreeSet<E>(comparator); set.addAll((Collection<? extends E>)snapshot.getElementsAsCollection()); init(set, snapshot.getDetachedState(), snapshot.isDirty()); } else init(null, snapshot.getDetachedState(), false); }
@SuppressWarnings("unchecked") @Override protected void updateFromSnapshot(ObjectInput in, PersistentCollectionSnapshot snapshot) { if (snapshot.isInitialized()) { Comparator<? super E> comparator = null; try { comparator = snapshot.newComparator(in); } catch (Exception e) { throw new RuntimeException("Could not create instance of comparator", e); } SortedSet<E> set = new TreeSet<E>(comparator); set.addAll((Collection<? extends E>)snapshot.getElementsAsCollection()); init(set, snapshot.getDetachedState(), snapshot.isDirty()); } else init(null, snapshot.getDetachedState(), false); }
public PersistentSortedSet<E> clone(boolean uninitialize) { PersistentSortedSet<E> set = new PersistentSortedSet<E>(); if (wasInitialized() && !uninitialize) set.init(getCollection(), null, isDirty()); return set; } }
public PersistentSortedSet<E> clone(boolean uninitialize) { PersistentSortedSet<E> set = new PersistentSortedSet<E>(); if (wasInitialized() && !uninitialize) set.init(getCollection(), null, isDirty()); return set; } }
public PersistentSortedSet<E> clone(boolean uninitialize) { PersistentSortedSet<E> set = new PersistentSortedSet<E>(); if (wasInitialized() && !uninitialize) set.init(getCollection(), null, isDirty()); return set; } }