kilim.http.IntList Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kilim Show documentation
Show all versions of kilim Show documentation
Coroutines, continuations, fibers, actors and message passing for the JVM
/* Copyright (c) 2006, Sriram Srinivasan
*
* You may distribute this software under the terms of the license
* specified in the file "License"
*/
package kilim.http;
public class IntList {
public int[] array;
public int numElements;
public IntList(int initialSize) {
array = new int[initialSize];
}
public IntList() {this(10);}
public void add(int element) {
if (numElements == array.length) {
array = (int[]) Utils.growArray(array, array.length * 3 / 2 );
}
array[numElements++] = element;
}
public int get(int index) {
return array[index];
}
}