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