/** * Create a ListIterator for a list. * * @param parent the parent list * @param fromIndex the index to start at */ protected internal LinkedListIterator(AbstractLinkedList parent, int fromIndex) : base() {// throws IndexOutOfBoundsException { this.parent = parent; this.expectedModCount = parent.modCount; this.nextJ = parent.getNode(fromIndex, true); this.nextIndexJ = fromIndex; }
protected internal LinkedSubList(AbstractLinkedList parent, int fromIndex, int toIndex) { if (fromIndex < 0) { throw new java.lang.IndexOutOfBoundsException("fromIndex = " + fromIndex); } if (toIndex > parent.size()) { throw new java.lang.IndexOutOfBoundsException("toIndex = " + toIndex); } if (fromIndex > toIndex) { throw new java.lang.IllegalArgumentException("fromIndex(" + fromIndex + ") > toIndex(" + toIndex + ")"); } this.parent = parent; this.offset = fromIndex; this.sizeJ = toIndex - fromIndex; this.expectedModCount = parent.modCount; }
protected internal PublicLinkedListIterator(AbstractLinkedList parent, int fromIndex) : base(parent, fromIndex) { }