home *** CD-ROM | disk | FTP | other *** search
- package java.util;
-
- class SubList extends AbstractList {
- // $FF: renamed from: l java.util.AbstractList
- private AbstractList field_0;
- private int offset;
- private int size;
- private int expectedModCount;
-
- SubList(AbstractList var1, int var2, int var3) {
- if (var2 < 0) {
- throw new IndexOutOfBoundsException("fromIndex = " + var2);
- } else if (var3 > ((AbstractCollection)var1).size()) {
- throw new IndexOutOfBoundsException("toIndex = " + var3);
- } else if (var2 > var3) {
- throw new IllegalArgumentException("fromIndex(" + var2 + ") > toIndex(" + var3 + ")");
- } else {
- this.field_0 = var1;
- this.offset = var2;
- this.size = var3 - var2;
- this.expectedModCount = this.field_0.modCount;
- }
- }
-
- public Object set(int var1, Object var2) {
- this.rangeCheck(var1);
- this.checkForComodification();
- return this.field_0.set(var1 + this.offset, var2);
- }
-
- public Object get(int var1) {
- this.rangeCheck(var1);
- this.checkForComodification();
- return this.field_0.get(var1 + this.offset);
- }
-
- public int size() {
- this.checkForComodification();
- return this.size;
- }
-
- public void add(int var1, Object var2) {
- if (var1 >= 0 && var1 <= this.size) {
- this.checkForComodification();
- this.field_0.add(var1 + this.offset, var2);
- this.expectedModCount = this.field_0.modCount;
- ++this.size;
- ++super.modCount;
- } else {
- throw new IndexOutOfBoundsException();
- }
- }
-
- public Object remove(int var1) {
- this.rangeCheck(var1);
- this.checkForComodification();
- Object var2 = this.field_0.remove(var1 + this.offset);
- this.expectedModCount = this.field_0.modCount;
- --this.size;
- ++super.modCount;
- return var2;
- }
-
- protected void removeRange(int var1, int var2) {
- this.checkForComodification();
- this.field_0.removeRange(var1 + this.offset, var2 + this.offset);
- this.expectedModCount = this.field_0.modCount;
- this.size -= var2 - var1;
- ++super.modCount;
- }
-
- public boolean addAll(Collection var1) {
- return this.addAll(this.size, var1);
- }
-
- public boolean addAll(int var1, Collection var2) {
- if (var1 >= 0 && var1 <= this.size) {
- int var3 = var2.size();
- if (var3 == 0) {
- return false;
- } else {
- this.checkForComodification();
- this.field_0.addAll(this.offset + var1, var2);
- this.expectedModCount = this.field_0.modCount;
- this.size += var3;
- ++super.modCount;
- return true;
- }
- } else {
- throw new IndexOutOfBoundsException("Index: " + var1 + ", Size: " + this.size);
- }
- }
-
- public Iterator iterator() {
- return ((AbstractList)this).listIterator();
- }
-
- public ListIterator listIterator(int var1) {
- this.checkForComodification();
- if (var1 >= 0 && var1 <= this.size) {
- return new 1(this, var1);
- } else {
- throw new IndexOutOfBoundsException("Index: " + var1 + ", Size: " + this.size);
- }
- }
-
- public List subList(int var1, int var2) {
- return new SubList(this, var1, var2);
- }
-
- private void rangeCheck(int var1) {
- if (var1 < 0 || var1 >= this.size) {
- throw new IndexOutOfBoundsException("Index: " + var1 + ",Size: " + this.size);
- }
- }
-
- private void checkForComodification() {
- if (this.field_0.modCount != this.expectedModCount) {
- throw new ConcurrentModificationException();
- }
- }
-
- // $FF: synthetic method
- static int access$000(SubList var0) {
- return var0.offset;
- }
-
- // $FF: synthetic method
- static AbstractList access$100(SubList var0) {
- return var0.field_0;
- }
-
- // $FF: synthetic method
- static int access$200(SubList var0) {
- return var0.size;
- }
-
- // $FF: synthetic method
- static int access$302(SubList var0, int var1) {
- return var0.expectedModCount = var1;
- }
-
- // $FF: synthetic method
- static int access$210(SubList var0) {
- return var0.size--;
- }
-
- // $FF: synthetic method
- static int access$208(SubList var0) {
- return var0.size++;
- }
- }
-