private void expandTo(int size){
  final double[] tempArray=new double[size];
  System.arraycopy(internalArray,0,tempArray,0,internalArray.length);
  internalArray=tempArray;
}

private void expandTo ( int size ) { final double [ ] tempArray = new double [ size ] ; System . arraycopy ( internalArray , 0 , tempArray , 0 , internalArray . length ) ; internalArray = tempArray ; }
expands the internal storage array to the specified size .
