1 19 package org.netbeans.mdr.storagemodel; 20 21 import java.util.*; 22 23 27 abstract class SubListImpl implements List { 28 private final int firstIndex; 29 private final int lastIndex; 30 private final ListIterator innerIterator; 31 32 33 public SubListImpl(int firstIndex, int lastIndex, ListIterator iterator) { 34 this.firstIndex = firstIndex; 35 this.lastIndex = lastIndex; 36 this.innerIterator = iterator; 37 } 38 39 public int size() { 40 return lastIndex - firstIndex; 41 } 42 43 public ListIterator listIterator(int index) { 44 return innerIterator; 45 } 46 47 private abstract class SubListIterator implements ListIterator { 48 private int currentIndex; 49 50 private SubListIterator(int fromIndex) { 51 currentIndex = fromIndex; 52 } 53 54 55 } 56 } 57 | Popular Tags |