home *** CD-ROM | disk | FTP | other *** search
/ S283 Planetary Science &n…he Search for Life DVD 2 / DVD-ROM.iso / install / jre1_3 / lib / rt.jar / javax / swing / JComponent$IntVector.class (.txt) < prev    next >
Encoding:
Java Class File  |  1979-12-31  |  685 b   |  34 lines

  1. package javax.swing;
  2.  
  3. final class JComponent$IntVector {
  4.    int[] array = null;
  5.    int count = 0;
  6.    int capacity = 0;
  7.  
  8.    int size() {
  9.       return this.count;
  10.    }
  11.  
  12.    int elementAt(int var1) {
  13.       return this.array[var1];
  14.    }
  15.  
  16.    void addElement(int var1) {
  17.       if (this.count == this.capacity) {
  18.          this.capacity = (this.capacity + 2) * 2;
  19.          int[] var2 = new int[this.capacity];
  20.          if (this.count > 0) {
  21.             System.arraycopy(this.array, 0, var2, 0, this.count);
  22.          }
  23.  
  24.          this.array = var2;
  25.       }
  26.  
  27.       this.array[this.count++] = var1;
  28.    }
  29.  
  30.    void setElementAt(int var1, int var2) {
  31.       this.array[var2] = var1;
  32.    }
  33. }
  34.