public static boolean compare(int result,int mode){
  if ((mode & COMPARE_MODE_EQ) == COMPARE_MODE_EQ && result == 0)   return true;
  if ((mode & COMPARE_MODE_GT) == COMPARE_MODE_GT && result > 0)   return true;
  if ((mode & COMPARE_MODE_LT) == COMPARE_MODE_LT && result < 0)   return true;
  return false;
}

public static boolean compare ( int result , int mode ) { if ( ( mode & COMPARE_MODE_EQ ) == COMPARE_MODE_EQ && result == 0 ) return true ; if ( ( mode & COMPARE_MODE_GT ) == COMPARE_MODE_GT && result > 0 ) return true ; if ( ( mode & COMPARE_MODE_LT ) == COMPARE_MODE_LT && result < 0 ) return true ; return false ; }
change compare result into boolean
