Advertisement
Guest User

Untitled

a guest
Sep 19th, 2014
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. if ((this.arraySize/4 >= this.size) && (this.arraySize > 8)) {
  2.  
  3. this.arraySize /= 2;
  4.  
  5. if (this.arraySize < 8) {
  6. this.arraySize = 8;
  7. }
  8.  
  9. Patient[] smaller = new Patient[this.arraySize];
  10.  
  11. for (int i=0, j=0; i < this.size; i++) {
  12. int k = (this.head+i)%(this.arraySize*2);
  13. smaller[j++] = thePatients[k];
  14. }
  15.  
  16. thePatients = smaller;
  17.  
  18. this.head = 0;
  19. this.tail = this.size;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement