private static int hash(Object x,int length){
  int h=System.identityHashCode(x);
  return ((h << 1) - (h << 8)) & (length - 1);
}

private static int hash ( Object x , int length ) { int h = System . identityHashCode ( x ) ; return ( ( h << 1 ) - ( h << 8 ) ) & ( length - 1 ) ; }
return index for object x .
