tree = new ArrayStorage((Integer) tree); } else { tree = new ArrayStorage();
public Transaction beginTransaction(int ensure) { try { return delegate.beginTransaction(ensure); } catch (UnsupportedOperationException ex) { // let's convert to InheritanceTree ArrayStorage arr = (ArrayStorage) delegate; InheritanceTree inh = new InheritanceTree(); changeDelegate(inh); // // Copy content // Enumeration<Pair<Object>> en = arr.lookup(Object.class); while (en.hasMoreElements()) { if (!inh.add(en.nextElement(), new ArrayList<Class>())) { throw new IllegalStateException("All objects have to be accepted"); // NOI18N } } // // Copy listeners // AbstractLookup.ReferenceToResult<?> ref = arr.cleanUpResult(null); if (ref != null) { ref.cloneList(inh); } // we have added the current content and now we can start transaction return delegate.beginTransaction(ensure); } }
oldIndex = findMatching(ref.template, changed.current, oldIndex); newIndex = findMatching(ref.template, changed.arr, newIndex);
Enumeration en = arr.lookup (Object.class); while (en.hasMoreElements()) { if (!delegate.add ((AbstractLookup.Pair)en.nextElement(), new ArrayList ())) { AbstractLookup.ReferenceToResult ref = arr.cleanUpResult(null); if (ref != null) { ref.cloneList (delegate);
tree = new ArrayStorage ((Integer)tree); } else { tree = new ArrayStorage ();
oldIndex = findMatching (ref.template, changed.current, oldIndex); newIndex = findMatching (ref.template, changed.arr, newIndex); if (oldIndex == -1 && newIndex == -1) { break;
Enumeration en = arr.lookup (Object.class); while (en.hasMoreElements()) { if (!delegate.add ((AbstractLookup.Pair)en.nextElement(), new ArrayList ())) { AbstractLookup.ReferenceToResult ref = arr.cleanUpResult(null); if (ref != null) { ref.cloneList (delegate);
tree = new ArrayStorage ((Integer)tree); } else { tree = new ArrayStorage ();
oldIndex = findMatching(ref.template, changed.current, oldIndex); newIndex = findMatching(ref.template, changed.arr, newIndex);
public Transaction beginTransaction(int ensure) { try { return delegate.beginTransaction(ensure); } catch (UnsupportedOperationException ex) { // let's convert to InheritanceTree ArrayStorage arr = (ArrayStorage) delegate; InheritanceTree inh = new InheritanceTree(); changeDelegate(inh); // // Copy content // Enumeration<Pair<Object>> en = arr.lookup(Object.class); while (en.hasMoreElements()) { if (!inh.add(en.nextElement(), new ArrayList<Class>())) { throw new IllegalStateException("All objects have to be accepted"); // NOI18N } } // // Copy listeners // AbstractLookup.ReferenceToResult<?> ref = arr.cleanUpResult(null); if (ref != null) { ref.cloneList(inh); } // we have added the current content and now we can start transaction return delegate.beginTransaction(ensure); } }
tree = new ArrayStorage((Integer) tree); } else { tree = new ArrayStorage();
oldIndex = findMatching (ref.template, changed.current, oldIndex); newIndex = findMatching (ref.template, changed.arr, newIndex); if (oldIndex == -1 && newIndex == -1) { break;
public Transaction beginTransaction(int ensure) { try { return delegate.beginTransaction(ensure); } catch (UnsupportedOperationException ex) { // let's convert to InheritanceTree ArrayStorage arr = (ArrayStorage) delegate; InheritanceTree inh = new InheritanceTree(); changeDelegate(inh); // // Copy content // Enumeration<Pair<Object>> en = arr.lookup(Object.class); while (en.hasMoreElements()) { if (!inh.add(en.nextElement(), new ArrayList<Class>())) { throw new IllegalStateException("All objects have to be accepted"); // NOI18N } } // // Copy listeners // AbstractLookup.ReferenceToResult<?> ref = arr.cleanUpResult(null); if (ref != null) { ref.cloneList(inh); } // we have added the current content and now we can start transaction return delegate.beginTransaction(ensure); } }
tree = new ArrayStorage((Integer) tree); } else { tree = new ArrayStorage();
oldIndex = findMatching(ref.template, changed.current, oldIndex); newIndex = findMatching(ref.template, changed.arr, newIndex);