@Override public void doInitialize() { init(new TreeMap<K, V>(), null, false); }
public PersistentSortedMap(SortedMap<K, V> collection, boolean clone) { if (collection != null) init(clone ? new TreeMap<K, V>(collection) : collection, null, false); }
public PersistentSortedMap(SortedMap<K, V> collection, boolean clone) { if (collection != null) init(clone ? new TreeMap<K, V>(collection) : collection, null, false); }
public PersistentSortedMap(SortedMap<K, V> collection, boolean clone) { if (collection != null) init(clone ? new TreeMap<K, V>(collection) : collection, null, false); }
@Override public void doInitialize(SortedMap<K, V> sortedMap, boolean empty) { init(empty ? new TreeMap<K, V>(sortedMap.comparator()) : sortedMap, null, false); }
@Override public void doInitialize(SortedMap<K, V> sortedMap, boolean empty) { init(empty ? new TreeMap<K, V>(sortedMap.comparator()) : sortedMap, null, false); }
@SuppressWarnings("unchecked") @Override protected void updateFromSnapshot(ObjectInput in, PersistentCollectionSnapshot snapshot) { if (snapshot.isInitialized()) { Comparator<? super K> comparator = null; try { comparator = snapshot.newComparator(in); } catch (Exception e) { throw new RuntimeException("Could not create instance of comparator", e); } SortedMap<K, V> map = new TreeMap<K, V>(comparator); map.putAll((Map<K, V>)snapshot.getElementsAsMap()); init(map, 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 K> comparator = null; try { comparator = snapshot.newComparator(in); } catch (Exception e) { throw new RuntimeException("Could not create instance of comparator", e); } SortedMap<K, V> map = new TreeMap<K, V>(comparator); map.putAll((Map<K, V>)snapshot.getElementsAsMap()); init(map, 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 K> comparator = null; try { comparator = snapshot.newComparator(in); } catch (Exception e) { throw new RuntimeException("Could not create instance of comparator", e); } SortedMap<K, V> map = new TreeMap<K, V>(comparator); map.putAll((Map<K, V>)snapshot.getElementsAsMap()); init(map, snapshot.getDetachedState(), snapshot.isDirty()); } else init(null, snapshot.getDetachedState(), false); }
public PersistentSortedMap<K, V> clone(boolean uninitialize) { PersistentSortedMap<K, V> map = new PersistentSortedMap<K, V>(); if (wasInitialized() && !uninitialize) map.init(getCollection(), null, isDirty()); return map; } }
public PersistentSortedMap<K, V> clone(boolean uninitialize) { PersistentSortedMap<K, V> map = new PersistentSortedMap<K, V>(); if (wasInitialized() && !uninitialize) map.init(getCollection(), null, isDirty()); return map; } }
public PersistentSortedMap<K, V> clone(boolean uninitialize) { PersistentSortedMap<K, V> map = new PersistentSortedMap<K, V>(); if (wasInitialized() && !uninitialize) map.init(getCollection(), null, isDirty()); return map; } }