The binary {@code equals} operator. This is the equivalent to the Java {@code ==} operator.
This function is null-safe.

@param left a number.
@param right a number.
@return {@code 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;
	}
154376
private Boolean compareValues(Session session, Object[] left,
                                  Object[] right) {

        int     result  = 0;
        boolean hasNull = false;

        if (left == null || right == null) {
            return null;
        }

        Object[] leftList  = left;
        Object[] rightList = right;

        for (int i = 0; i < nodes[LEFT].nodes.length; i++) {
            if (leftList[i] == null) {
                if (opType == OpTypes.MATCH_PARTIAL
                        || opType == OpTypes.MATCH_UNIQUE_PARTIAL) {
                    continue;
                }

                hasNull = true;
            }

            if (rightList[i] == null) {
                hasNull = true;
            }

            Object leftValue  = leftList[i];
            Object rightValue = rightList[i];
            Type[] types      = nodes[LEFT].nodeDataTypes;

            result = types[i].compare(leftValue, rightValue);

            if (result != 0) {
                break;
            }
        }

        switch (opType) {

            case OpTypes.MATCH_SIMPLE :
            case OpTypes.MATCH_UNIQUE_SIMPLE :
            case OpTypes.MATCH_PARTIAL :
            case OpTypes.MATCH_UNIQUE_PARTIAL :
            case OpTypes.MATCH_FULL :
            case OpTypes.MATCH_UNIQUE_FULL :
            case OpTypes.NOT_DISTINCT :
                return result == 0 ? Boolean.TRUE
                                   : Boolean.FALSE;

            case OpTypes.IN :
            case OpTypes.EQUAL :
                if (hasNull) {
                    return null;
                }

                return result == 0 ? Boolean.TRUE
                                   : Boolean.FALSE;

            case OpTypes.NOT_EQUAL :
                if (hasNull) {
                    return null;
                }

                return result != 0 ? Boolean.TRUE
                                   : Boolean.FALSE;

            case OpTypes.GREATER :
                if (hasNull) {
                    return null;
                }

                return result > 0 ? Boolean.TRUE
                                  : Boolean.FALSE;

            case OpTypes.GREATER_EQUAL :
                if (hasNull) {
                    return null;
                }

                return result >= 0 ? Boolean.TRUE
                                   : Boolean.FALSE;

            case OpTypes.SMALLER_EQUAL :
                if (hasNull) {
                    return null;
                }

                return result <= 0 ? Boolean.TRUE
                                   : Boolean.FALSE;

            case OpTypes.SMALLER :
                if (hasNull) {
                    return null;
                }

                return result < 0 ? Boolean.TRUE
                                  : Boolean.FALSE;

            default :
                throw Error.runtimeError(ErrorCode.U_S0500, "Expression");
        }
    }
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;
    }
1301404
@Pure
	@Inline(value="($1 != $2)", constantExpression=true)
	public static boolean operator_notEquals(char a, int b) {
		return a != b;
	}
1000612
public Object divide(Object left, Object right) {
    if (left == null && right == null) {
      return 0;
    }

    // if either are floating point (double or float) use double
    if (isFloatingPointNumber(left) || isFloatingPointNumber(right)) {
      double l = toDouble(left);
      double r = toDouble(right);
      if (r == 0.0) {
        throw new ArithmeticException("/");
      }
      return new Double(l / r);
    }

    // if either are bigdecimal use that type
    if (left instanceof BigDecimal || right instanceof BigDecimal) {
      BigDecimal l = toBigDecimal(left);
      BigDecimal r = toBigDecimal(right);
      if (BigDecimal.ZERO.equals(r)) {
        throw new ArithmeticException("/");
      }
      BigDecimal result = l.divide(r, getMathContext());
      return narrowBigDecimal(left, right, result);
    }

    // otherwise treat as integers
    BigInteger l = toBigInteger(left);
    BigInteger r = toBigInteger(right);
    if (BigInteger.ZERO.equals(r)) {
      throw new ArithmeticException("/");
    }
    BigInteger result = l.divide(r);
    return narrowBigInteger(left, right, result);
  }
153370
public Object multiply(Object left, Object right) {
    if (left == null && right == null) {
      return 0;
    }

    // if either are floating point (double or float) use double
    if (isFloatingPointNumber(left) || isFloatingPointNumber(right)) {
      double l = toDouble(left);
      double r = toDouble(right);
      return new Double(l * r);
    }

    // if either are bigdecimal use that type
    if (left instanceof BigDecimal || right instanceof BigDecimal) {
      BigDecimal l = toBigDecimal(left);
      BigDecimal r = toBigDecimal(right);
      BigDecimal result = l.multiply(r, getMathContext());
      return narrowBigDecimal(left, right, result);
    }

    // otherwise treat as integers
    BigInteger l = toBigInteger(left);
    BigInteger r = toBigInteger(right);
    BigInteger result = l.multiply(r);
    return narrowBigInteger(left, right, result);
  }
662527
@NonNull
  public static Term divide(@NonNull Term left, @NonNull Term right) {
    return new BinaryArithmeticTerm(ArithmeticOperator.QUOTIENT, left, right);
  }
708914
public static <L, R> @NonNull Pair<L, R> left(final @Nullable L left) {
    return of(left, null);
  }
635262
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;
	}
1250447
public static <T> boolean listEquals(List<T> left, List<T> right) {
        if (left == null) {
            return right == null;
        } else {
            if (right == null) {
                return false;
            }
            if (left.size() != right.size()) {
                return false;
            }

            List<T> ltmp = new ArrayList<T>(left);
            List<T> rtmp = new ArrayList<T>(right);
            for (T t : ltmp) {
                rtmp.remove(t);
            }
            return rtmp.isEmpty();
        }
    }
1217205
public static boolean lessThan(SoyValue left, SoyValue right) {
    if (left instanceof SoyString && right instanceof SoyString) {
      return left.stringValue().compareTo(right.stringValue()) < 0;
    } else if (left instanceof IntegerData && right instanceof IntegerData) {
      return left.longValue() < right.longValue();
    } else {
      return left.numberValue() < right.numberValue();
    }
  }
392132
public static function lessThanOrEqual(Expr $left, Expr $right) : BinOp
    {
        return new BinOp($left, BinOp::LESS_THAN_OR_EQUAL, $right);
    }
705064
@Pure
	@Inline(value="($1 == $2)", constantExpression=true)
	public static boolean operator_equals(long a, double b) {
		return a == b;
	}
1336024
public boolean lessThan(Object left, Object right) {
    if ((left == right) || (left == null) || (right == null)) {
      return false;
    }
    else {
      return compare(left, right, "<") < 0;
    }

  }
119876
public static BitSet or(BitSet left, BitSet right) {
        BitSet result = (BitSet) left.clone();
        result.or(right);
        return result;
    }
1362697
public static Boolean ne(Object left, Object right) {
        return not(EvalHelper.isEqual(left, right, null));
    }
1173824
public static ExprBoolean toExprBoolean(Expression left, Expression right, int operation) {
	if (left instanceof Literal && right instanceof Literal) {
	    Boolean l = ((Literal) left).getBoolean(null);
	    Boolean r = ((Literal) right).getBoolean(null);

	    if (l != null && r != null) {
		switch (operation) {
		case Factory.OP_BOOL_AND:
		    return left.getFactory().createLitBoolean(l.booleanValue() && r.booleanValue(), left.getStart(), right.getEnd());
		case Factory.OP_BOOL_OR:
		    return left.getFactory().createLitBoolean(l.booleanValue() || r.booleanValue(), left.getStart(), right.getEnd());
		case Factory.OP_BOOL_XOR:
		    return left.getFactory().createLitBoolean(l.booleanValue() ^ r.booleanValue(), left.getStart(), right.getEnd());
		}
	    }
	}
	return new OpBool(left, right, operation);
    }