ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/AbstractList.java
(Generate patch)

Comparing jsr166/src/main/java/util/AbstractList.java (file contents):
Revision 1.8 by dl, Wed Apr 19 15:07:14 2006 UTC vs.
Revision 1.9 by jsr166, Thu Apr 20 21:49:36 2006 UTC

# Line 617 | Line 617 | class SubList<E> extends AbstractList<E>
617      int length;                   // Number of elements in this sublist
618  
619      SubList(AbstractList<E> base,
620 <            AbstractList<E> parent,
621 <            int baseIndex,
622 <            int fromIndex,
620 >            AbstractList<E> parent,
621 >            int baseIndex,
622 >            int fromIndex,
623              int toIndex) {
624          if (fromIndex < 0)
625              throw new IndexOutOfBoundsException("fromIndex = " + fromIndex);
# Line 640 | Line 640 | class SubList<E> extends AbstractList<E>
640       * Returns an IndexOutOfBoundsException with nicer message
641       */
642      private IndexOutOfBoundsException indexError(int index) {
643 <        return new IndexOutOfBoundsException("Index: " + index +
643 >        return new IndexOutOfBoundsException("Index: " + index +
644                                               ", Size: " + length);
645      }
646  
# Line 715 | Line 715 | class SubList<E> extends AbstractList<E>
715      }
716  
717      public List<E> subList(int fromIndex, int toIndex) {
718 <        return new SubList(base, this, fromIndex + baseOffset,
718 >        return new SubList(base, this, fromIndex + baseOffset,
719                             fromIndex, toIndex);
720      }
721  
# Line 750 | Line 750 | class SubList<E> extends AbstractList<E>
750          int cursor;                   // Current index
751          int fence;                    // Upper bound on cursor
752          int lastRet;                  // Index of returned element, or -1
753 <        int expectedModCount;         // Expected modCount of base
753 >        int expectedModCount;         // Expected modCount of base
754  
755          SubListIterator(SubList<E> list, int index) {
756              this.lastRet = -1;
# Line 861 | Line 861 | class SubList<E> extends AbstractList<E>
861  
862   class RandomAccessSubList<E> extends SubList<E> implements RandomAccess {
863      RandomAccessSubList(AbstractList<E> base,
864 <                        AbstractList<E> parent, int baseIndex,
864 >                        AbstractList<E> parent, int baseIndex,
865                          int fromIndex, int toIndex) {
866          super(base, parent, baseIndex, fromIndex, toIndex);
867      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines