@SuppressWarnings("unchecked") private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); _size = 0; _modCount = 0; _cursors = new ArrayList<WeakReference<Cursor>>(); _head = new Listable<E>(null,null,null); int size = in.readInt(); for (int i=0;i<size;i++) { this.add((E)in.readObject()); } }
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); _size = 0; _modCount = 0; _cursors = new ArrayList(); _head = new Listable(null,null,null); int size = in.readInt(); for (int i=0;i<size;i++) { this.add(in.readObject()); } }
@SuppressWarnings("unchecked") private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); _size = 0; _modCount = 0; _cursors = new ArrayList<WeakReference<Cursor>>(); _head = new Listable<E>(null,null,null); int size = in.readInt(); for (int i=0;i<size;i++) { this.add((E)in.readObject()); } }
/** * Inserts a new <i>value</i> into my * list, after the specified <i>before</i> element, and before the * specified <i>after</i> element * * @return the newly created * {@link org.apache.commons.collections.CursorableLinkedList.Listable} */ protected Listable insertListable(Listable before, Listable after, Object value) { _modCount++; _size++; Listable elt = new Listable(before,after,value); if(null != before) { before.setNext(elt); } else { _head.setNext(elt); } if(null != after) { after.setPrev(elt); } else { _head.setPrev(elt); } broadcastListableInserted(elt); return elt; }
/** * Inserts a new <i>value</i> into my * list, after the specified <i>before</i> element, and before the * specified <i>after</i> element * * @return the newly created * {@link org.apache.commons.collections.CursorableLinkedList.Listable} */ protected Listable<E> insertListable(Listable<E> before, Listable<E> after, E value) { _modCount++; _size++; Listable<E> elt = new Listable<E>(before,after,value); if(null != before) { before.setNext(elt); } else { _head.setNext(elt); } if(null != after) { after.setPrev(elt); } else { _head.setPrev(elt); } broadcastListableInserted(elt); return elt; }
/** * Inserts a new <i>value</i> into my * list, after the specified <i>before</i> element, and before the * specified <i>after</i> element * * @return the newly created * {@link org.apache.commons.collections.CursorableLinkedList.Listable} */ protected Listable insertListable(Listable before, Listable after, Object value) { _modCount++; _size++; Listable elt = new Listable(before,after,value); if(null != before) { before.setNext(elt); } else { _head.setNext(elt); } if(null != after) { after.setPrev(elt); } else { _head.setPrev(elt); } broadcastListableInserted(elt); return elt; }
/** * Inserts a new <i>value</i> into my * list, after the specified <i>before</i> element, and before the * specified <i>after</i> element * * @return the newly created * {@link org.apache.commons.collections.CursorableLinkedList.Listable} */ protected Listable<E> insertListable(Listable<E> before, Listable<E> after, E value) { _modCount++; _size++; Listable<E> elt = new Listable<E>(before,after,value); if(null != before) { before.setNext(elt); } else { _head.setNext(elt); } if(null != after) { after.setPrev(elt); } else { _head.setPrev(elt); } broadcastListableInserted(elt); return elt; }
ListIter(int index) { if(index == 0) { _cur = new Listable(null,_head.next(),null); _nextIndex = 0; } else if(index == _size) { _cur = new Listable(_head.prev(),null,null); _nextIndex = _size; } else { Listable temp = getListableAt(index); _cur = new Listable(temp.prev(),temp,null); _nextIndex = index; } }
ListIter(int index) { if(index == 0) { _cur = new Listable(null,_head.next(),null); _nextIndex = 0; } else if(index == _size) { _cur = new Listable(_head.prev(),null,null); _nextIndex = _size; } else { Listable temp = getListableAt(index); _cur = new Listable(temp.prev(),temp,null); _nextIndex = index; } }
@SuppressWarnings("unchecked") private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); _size = 0; _modCount = 0; _cursors = new ArrayList<WeakReference<Cursor>>(); _head = new Listable<E>(null,null,null); int size = in.readInt(); for (int i=0;i<size;i++) { this.add((E)in.readObject()); } }
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); _size = 0; _modCount = 0; _cursors = new ArrayList(); _head = new Listable(null,null,null); int size = in.readInt(); for (int i=0;i<size;i++) { this.add(in.readObject()); } }
/** * Inserts a new <i>value</i> into my * list, after the specified <i>before</i> element, and before the * specified <i>after</i> element * * @return the newly created * {@link org.apache.commons.collections.CursorableLinkedList.Listable} */ protected Listable<E> insertListable(Listable<E> before, Listable<E> after, E value) { _modCount++; _size++; Listable<E> elt = new Listable<E>(before,after,value); if(null != before) { before.setNext(elt); } else { _head.setNext(elt); } if(null != after) { after.setPrev(elt); } else { _head.setPrev(elt); } broadcastListableInserted(elt); return elt; }