public void contract(){
  final double[] tempArray=new double[numElements + 1];
  System.arraycopy(internalArray,startIndex,tempArray,0,numElements);
  internalArray=tempArray;
  startIndex=0;
}

public void contract ( ) { final double [ ] tempArray = new double [ numElements + 1 ] ; System . arraycopy ( internalArray , startIndex , tempArray , 0 , numElements ) ; internalArray = tempArray ; startIndex = 0 ; }
contracts the storage array to the ( size of the element set ) + 1 - to avoid a zero length array . this function also resets the startindex to zero .
