@Override public void trim(){
  if (counter < x.length) {
    int[] y=new int[counter];
    System.arraycopy(x,0,y,0,counter);
    x=y;
    resizeValues(counter);
  }
}

@ Override public void trim ( ) { if ( counter < x . length ) { int [ ] y = new int [ counter ] ; System . arraycopy ( x , 0 , y , 0 , counter ) ; x = y ; resizeValues ( counter ) ; } }
trims the data row to the number of actually used elements .
