public PersistentSet newInstance(ExtendedObjectInput in, String className) throws IOException, ClassNotFoundException, InstantiationException, IllegalAccessException, InvocationTargetException, SecurityException, NoSuchMethodException { PersistentCollectionSnapshot snapshot = new JMFPersistentCollectionSnapshot(null); snapshot.readInitializationData(in); return (snapshot.isInitialized() ? new PersistentSet(null, new HashSet<Object>()) : new PersistentSet(null)); } }
public PersistentBag newInstance(ExtendedObjectInput in, String className) throws IOException, ClassNotFoundException, InstantiationException, IllegalAccessException, InvocationTargetException, SecurityException, NoSuchMethodException { PersistentCollectionSnapshot snapshot = new JMFPersistentCollectionSnapshot(null); snapshot.readInitializationData(in); return (snapshot.isInitialized() ? new PersistentBag(null, new ArrayList<Object>()) : new PersistentBag(null)); } }
public PersistentList newInstance(ExtendedObjectInput in, String className) throws IOException, ClassNotFoundException, InstantiationException, IllegalAccessException, InvocationTargetException, SecurityException, NoSuchMethodException { PersistentCollectionSnapshot snapshot = new JMFPersistentCollectionSnapshot(null); snapshot.readInitializationData(in); return (snapshot.isInitialized() ? new PersistentList(null, new ArrayList<Object>()) : new PersistentList(null)); } }
public PersistentMap newInstance(ExtendedObjectInput in, String className) throws IOException, ClassNotFoundException, InstantiationException, IllegalAccessException, InvocationTargetException, SecurityException, NoSuchMethodException { PersistentCollectionSnapshot snapshot = new JMFPersistentCollectionSnapshot(null); snapshot.readInitializationData(in); return (snapshot.isInitialized() ? new PersistentMap(null, new HashMap<Object, Object>()) : new PersistentMap(null)); } }
public PersistentSortedMap newInstance(ExtendedObjectInput in, String className) throws IOException, ClassNotFoundException, InstantiationException, IllegalAccessException, InvocationTargetException, SecurityException, NoSuchMethodException { PersistentCollectionSnapshot snapshot = new JMFPersistentCollectionSnapshot(true, null); snapshot.readInitializationData(in); if (!snapshot.isInitialized()) return new PersistentSortedMap(null); Comparator<? super Object> comparator = snapshot.newComparator(in); return new PersistentSortedMap(null, new TreeMap<Object, Object>(comparator)); } }
public PersistentSortedSet newInstance(ExtendedObjectInput in, String className) throws IOException, ClassNotFoundException, InstantiationException, IllegalAccessException, InvocationTargetException, SecurityException, NoSuchMethodException { PersistentCollectionSnapshot snapshot = new JMFPersistentCollectionSnapshot(true, null); snapshot.readInitializationData(in); if (!snapshot.isInitialized()) return new PersistentSortedSet(null); Comparator<? super Object> comparator = snapshot.newComparator(in); return new PersistentSortedSet(null, new TreeSet<Object>(comparator)); } }