code: public static int compareFlags(int left, int right) {
  		if (left == right) {
  			return 0;
  		}
  		int leftSuccess = left & SUCCESS_OR_LAMBDA;
  		int rightSuccess = right & SUCCESS_OR_LAMBDA;
  		if (leftSuccess != rightSuccess) {
  			if (leftSuccess == 0)
  				return 1;
  			if (rightSuccess == 0)
  				return -1;
  			if (leftSuccess < rightSuccess)
  				return -1;
  			return 1;
  		}
  		if ((left & SYNONYM) != (right & SYNONYM)) {
  			if ((left & SYNONYM) != 0)
  				return 1;
  			return -1;
  		}
  		return 0;
  	}
docs: Simple comparison of two flags. If both indicate compatibility, the one with the
  better compatibility level wins.
  
  Returns {@code -1} for the left, {@code 1} for the right or {@code 0} if undecided.