Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ((this.arraySize/4 >= this.size) && (this.arraySize > 8)) {
- this.arraySize /= 2;
- if (this.arraySize < 8) {
- this.arraySize = 8;
- }
- Patient[] smaller = new Patient[this.arraySize];
- for (int i=0, j=0; i < this.size; i++) {
- int k = (this.head+i)%(this.arraySize*2);
- smaller[j++] = thePatients[k];
- }
- thePatients = smaller;
- this.head = 0;
- this.tail = this.size;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement