home *** CD-ROM | disk | FTP | other *** search
- package com.sfs.html;
-
- class IntVector {
- private int[] data = new int[100];
- private int size;
- private int index;
-
- protected void reset() {
- this.index = 0;
- }
-
- protected int nextElement() {
- return this.data[this.index++];
- }
-
- protected boolean hasMoreElements() {
- return this.index < this.size;
- }
-
- protected void addElement(int var1) {
- if (this.size == this.data.length) {
- int[] var2 = new int[2 * this.size];
- System.arraycopy(this.data, 0, var2, 0, this.size);
- this.data = var2;
- }
-
- this.data[this.size++] = var1;
- }
-
- protected void trimToSize() {
- if (this.size < this.data.length) {
- int[] var1 = new int[this.size];
- System.arraycopy(this.data, 0, var1, 0, this.size);
- this.data = var1;
- }
-
- }
- }
-