Compares arguments

@param eq    operation which will be used for the arguments
@param left  first argument which will be compared
@param right second argument which will be compared
@return new instance of the PredicateDefCmp
970943
public static PredicateDef cmp(CompareOperation eq, Expression left, Expression right) {
		return new PredicateDefCmp(eq, left, right);
	}
971876
@Pure
	@Inline(value = "($1 != null && ($1.shortValue() == $2))", constantExpression = true)
	public static boolean operator_equals(Short left, long right) {
		return left != null ? left.shortValue() == right : false;
	}
609014
func Eq(left, right interface{}) Condition {
	return Condition{
		Type:  ConditionEq,
		Left:  NewOperand(left),
		Right: NewOperand(right),
	}
}
274443
public function or ($left, $right, $comparator = Cmp::EQ)
    {
        $this->getWhereStatement()->where($left, $right, $comparator, Cmp::VEL);
        
        return $this;
    }
40843
public static <T> ComparisonChain compare(T left, T right, Comparator<T> comparator) {
        return new ComparisonChain().compare(left, right, comparator);
    }
1066828
@Pure /* not guaranteed, since compareTo() is invoked */
	@Inline("($1.compareTo($2) > 0)")
	public static <C> boolean operator_greaterThan(Comparable<? super C> left, C right) {
		return left.compareTo(right) > 0;
	}
673465
public static Expression firstNonNull(final Expression left, final Expression right) {
    checkArgument(left.resultType().getSort() == Type.OBJECT);
    checkArgument(right.resultType().getSort() == Type.OBJECT);
    Features features = Features.of();
    if (Expression.areAllCheap(left, right)) {
      features = features.plus(Feature.CHEAP);
    }
    if (right.isNonNullable()) {
      features = features.plus(Feature.NON_NULLABLE);
    }
    return new Expression(left.resultType(), features) {
      @Override
      protected void doGen(CodeBuilder cb) {
        Label leftIsNonNull = new Label();
        left.gen(cb); // Stack: L
        cb.dup(); // Stack: L, L
        cb.ifNonNull(leftIsNonNull); // Stack: L
        // pop the extra copy of left
        cb.pop(); // Stack:
        right.gen(cb); // Stack: R
        cb.mark(leftIsNonNull); // At this point the stack has an instance of L or R
      }
    };
  }
941131
@Pure /* not guaranteed, since compareTo() is invoked */
	@Inline("($1.compareTo($2) <= 0)")
	public static <C> boolean operator_lessEqualsThan(Comparable<? super C> left, C right) {
		return left.compareTo(right) <= 0;
	}
731443
public static function notEqual(Expr $left, Expr $right) : BinOp
    {
        return new BinOp($left, BinOp::NOT_EQUAL, $right);
    }
786921
public static Boolean eq(Object left, Object right) {
        return EvalHelper.isEqual(left, right, null);
    }
234199
def assertrepr_compare(config, op, left, right):
    """"""
    width = 80 - 15 - len(op) - 2  # 15 chars indentation, 1 space around op
    left_repr = py.io.saferepr(left, maxsize=int(width//2))
    right_repr = py.io.saferepr(right, maxsize=width-len(left_repr))

    summary = u('%s %s %s') % (ecu(left_repr), op, ecu(right_repr))

    issequence = lambda x: (isinstance(x, (list, tuple, Sequence)) and
                            not isinstance(x, basestring))
    istext = lambda x: isinstance(x, basestring)
    isdict = lambda x: isinstance(x, dict)
    isset = lambda x: isinstance(x, (set, frozenset))

    def isiterable(obj):
        try:
            iter(obj)
            return not istext(obj)
        except TypeError:
            return False

    verbose = config.getoption('verbose')
    explanation = None
    try:
        if op == '==':
            if istext(left) and istext(right):
                explanation = _diff_text(left, right, verbose)
            else:
                if issequence(left) and issequence(right):
                    explanation = _compare_eq_sequence(left, right, verbose)
                elif isset(left) and isset(right):
                    explanation = _compare_eq_set(left, right, verbose)
                elif isdict(left) and isdict(right):
                    explanation = _compare_eq_dict(left, right, verbose)
                if isiterable(left) and isiterable(right):
                    expl = _compare_eq_iterable(left, right, verbose)
                    if explanation is not None:
                        explanation.extend(expl)
                    else:
                        explanation = expl
        elif op == 'not in':
            if istext(left) and istext(right):
                explanation = _notin_text(left, right, verbose)
    except Exception:
        _logger.exception("dessert: representation of details failed.  "
                          "Probably an object has a faulty __repr__.")

    if not explanation:
        return None

    return [summary] + explanation
1091074
public static <D> Predicate in(Expression<D> left, Collection<? extends D> right) {
        if (right.size() == 1) {
            return eqConst(left, right.iterator().next());
        } else {
            return predicate(Ops.IN, left, ConstantImpl.create(right));
        }
    }
31253
@Override
    public int compareTo(final Pair<L, R> other) {
      return new CompareToBuilder().append(getLeft(), other.getLeft())
              .append(getRight(), other.getRight()).toComparison();
    }
1241322
public static int compareVersions(Object[] left, Object[] right) {
        if (left == null || right == null) {
            throw new IllegalArgumentException("Invalid versions");
        }

        for (int i = 0; i < left.length; i++) {
            // right is shorter than left and share the same prefix => left must be larger
            if (right.length == i) {
                return 1;
            }

            if (left[i] instanceof Integer) {
                if (right[i] instanceof Integer) {
                    // compare two numbers
                    if (((Integer) left[i]) > ((Integer) right[i])) {
                        return 1;
                    } else if (((Integer) left[i]) < ((Integer) right[i])) {
                        return -1;
                    }
                    else {
                        continue;
                    }
                }
                else {
                    // numbers always greater than alphanumeric tags
                    return 1;
                }
            }
            else if (right[i] instanceof Integer) {
                // alphanumeric tags always less than numbers
                return -1;
            }
            else {
                // compare two alphanumeric tags lexicographically
                int cmp = ((String) left[i]).compareTo((String) right[i]);
                if (cmp != 0) {
                    return cmp;
                }
                else {
                    // two alphanumeric tags are the same... so keep comparing
                    continue;
                }
            }
        }

        // left is shorter than right and share the same prefix, must be less
        if (left.length < right.length) {
            return -1;
        }

        // samesies
        return 0;
    }
831285
public static SMARTSAtom or(IQueryAtom left, IQueryAtom right) {
        return new Disjunction(left.getBuilder(), left, right);
    }
463025
@Deprecated
    public static Criteria create(String left, String operator, String right) {
        Criteria criteria = new Criteria(ValueNode.toValueNode(left));
        criteria.criteriaType = RelationalOperator.fromString(operator);
        criteria.right = ValueNode.toValueNode(right);
        return criteria;
    }
478760
private String sortedEquivalence(final Equivalence equivalence) {
        final Formula right;
        final Formula left;
        if (this.comparator.compare(equivalence.left(), equivalence.right()) <= 0) {
            right = equivalence.right();
            left = equivalence.left();
        } else {
            right = equivalence.left();
            left = equivalence.right();
        }
        final String leftString = FType.EQUIV.precedence() < left.type().precedence() ? toString(left) : bracket(left);
        final String rightString = FType.EQUIV.precedence() < right.type().precedence() ? toString(right) : bracket(right);
        return String.format("%s%s%s", leftString, equivalence(), rightString);
    }