protected static long[] remove(long[] old,int oldSize,int pos){
  long[] result;
  if (old.length - oldSize < COPY_THRESHOLD) {
    result=old;
  }
 else {
    result=new long[oldSize - 1];
    System.arraycopy(old,0,result,0,pos);
  }
  System.arraycopy(old,pos + 1,result,pos,oldSize - pos - 1);
  return result;
}

protected static long [ ] remove ( long [ ] old , int oldSize , int pos ) { long [ ] result ; if ( old . length - oldSize < COPY_THRESHOLD ) { result = old ; } else { result = new long [ oldSize - 1 ] ; System . arraycopy ( old , 0 , result , 0 , pos ) ; } System . arraycopy ( old , pos + 1 , result , pos , oldSize - pos - 1 ) ; return result ; }
delete a value in an array . a new array is created if required .
