All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.xtext.xbase.lib.IntegerExtensions Maven / Gradle / Ivy

There is a newer version: 2.4.3
Show newest version
/*******************************************************************************
 * Copyright (c) 2011 itemis AG (http://www.itemis.eu) and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *******************************************************************************/
package org.eclipse.xtext.xbase.lib;

import com.google.common.annotations.GwtCompatible;



/**
 * This is an extension library for {@link Integer integral numbers}, e.g. int or Integer.
 * 
 * @author Sven Efftinge - Initial contribution and API
 * @author Jan Koehnlein - Primitive versions
 * @since 2.3
 */
@GwtCompatible public class IntegerExtensions {
	
	/**
	 * The .. operator yields an {@link IntegerRange}.
	 * 
	 * @param a the start of the range.
	 * @param b the end of the range.
	 * @return an {@link IntegerRange}. Never null.
	 * @since 2.3
	 */
	@Pure
	@Inline(value="new $3($1, $2)", imported=IntegerRange.class, statementExpression=false)
	public static IntegerRange operator_upTo(final int a, final int b) {
		return new IntegerRange(a, b);
	}
	
	/**
	 * The ..< operator yields an {@link ExclusiveRange}.
	 * 
	 * @param a the start of the range.
	 * @param b the end of the range (exclusive).
	 * @return an {@link ExclusiveRange}. Never null.
	 * @since 2.4
	 */
	@Pure
	@Inline(value="new $3($1, $2, true)", imported=ExclusiveRange.class, statementExpression=false)
	public static ExclusiveRange operator_doubleDotLessThan(final int a, final int b) {
		return new ExclusiveRange(a, b, true);
	}
	
	/**
	 * The >.. operator yields an {@link ExclusiveRange}.
	 * 
	 * @param a the start of the range (exclusive).
	 * @param b the end of the range.
	 * @return an {@link ExclusiveRange}. Never null.
	 * @since 2.4
	 */
	@Pure
	@Inline(value="new $3($1, $2, false)", imported=ExclusiveRange.class, statementExpression=false)
	public static ExclusiveRange operator_greaterThanDoubleDot(final int a, final int b) {
		return new ExclusiveRange(a, b, false);
	}
	
	/**
	 * The bitwise inclusive or operation. This is the equivalent to the java | operator.
	 * 
	 * @param a
	 *            an integer.
	 * @param b
	 *            an integer.
	 * @return a|b
	 */
	@Pure
	@Inline("($1 | $2)")
	public static int bitwiseOr(int a, int b) {
		return a | b;
	}

	/**
	 * The bitwise exclusive or operation. This is the equivalent to the java ^ operator.
	 * 
	 * @param a
	 *            an integer.
	 * @param b
	 *            an integer.
	 * @return a^b
	 */
	@Pure
	@Inline("($1 ^ $2)")
	public static int bitwiseXor(int a, int b) {
		return a ^ b;
	}

	/**
	 * The bitwise and operation. This is the equivalent to the java & operator.
	 * 
	 * @param a
	 *            an integer.
	 * @param b
	 *            an integer.
	 * @return a&b
	 */
	@Pure
	@Inline("($1 & $2)")
	public static int bitwiseAnd(int a, int b) {
		return a & b;
	}

	/**
	 * The bitwise complement operation. This is the equivalent to the java ~ operator.
	 * 
	 * @param a
	 *            an integer.
	 * @return the bitwise complement of a.
	 */
	@Pure
	@Inline("(~$1)")
	public static int bitwiseNot(int a) {
		return ~a;
	}

	/**
	 * The binary signed left shift operator. This is the equivalent to the java << operator.
	 * Fills in a zero as the least significant bit.
	 * 
	 * @param a
	 *            an integer.
	 * @param distance 
	 *            the number of times to shift.
	 * @return a<<distance
	 * @deprecated use {@link #operator_doubleLessThan(int, int)} instead
	 */
	@Pure
	@Inline("($1 << $2)")
	@Deprecated
	public static int shiftLeft(int a, int distance) {
		return a << distance;
	}
	
	/**
	 * The binary signed left shift operator. This is the equivalent to the java << operator.
	 * Fills in a zero as the least significant bit.
	 * 
	 * @param a
	 *            an integer.
	 * @param distance 
	 *            the number of times to shift.
	 * @return a<<distance
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 << $2)")
	public static int operator_doubleLessThan(int a, int distance) {
		return a << distance;
	}

	/**
	 * The binary signed right sift operator. This is the equivalent to the java >> operator.
	 * Shifts in the value of the sign bit as the leftmost bit, thus preserving the sign of the initial value.
	 * 
	 * @param a
	 *            an integer.
	 * @param distance 
	 *            the number of times to shift.
	 * @return a>>distance
	 * @deprecated use {@link #operator_doubleGreaterThan(int, int)} instead
	 */
	@Pure
	@Inline("($1 >> $2)")
	@Deprecated
	public static int shiftRight(int a, int distance) {
		return a >> distance;
	}
	
	/**
	 * The binary signed right sift operator. This is the equivalent to the java >> operator.
	 * Shifts in the value of the sign bit as the leftmost bit, thus preserving the sign of the initial value.
	 * 
	 * @param a
	 *            an integer.
	 * @param distance 
	 *            the number of times to shift.
	 * @return a>>distance
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 >> $2)")
	public static int operator_doubleGreaterThan(int a, int distance) {
		return a >> distance;
	}

	/**
	 * The binary unsigned right shift operator. This is the equivalent to the java >>> operator.
	 * Shifts in zeros into as leftmost bits, thus always yielding a positive integer.
	 * 
	 * @param a
	 *            an integer.
	 * @param distance
	 *            the number of times to shift.
	 * @return a>>>distance
	 * @deprecated use {@link #operator_tripleGreaterThan(int, int)} instead
	 */
	@Pure
	@Inline("($1 >>> $2)")
	@Deprecated
	public static int shiftRightUnsigned(int a, int distance) {
		return a >>> distance;
	}
	
	/**
	 * The binary unsigned right shift operator. This is the equivalent to the java >>> operator.
	 * Shifts in zeros into as leftmost bits, thus always yielding a positive integer.
	 * 
	 * @param a
	 *            an integer.
	 * @param distance
	 *            the number of times to shift.
	 * @return a>>>distance
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 >>> $2)")
	public static int operator_tripleGreaterThan(int a, int distance) {
		return a >>> distance;
	}

	// BEGIN generated code
	/**
	 * The unary minus operator. This is the equivalent to the Java's - function.
	 * 
	 * @param a  an integer.
	 * @return   -a
	 * @since 2.3
	 */
	@Pure
	@Inline("(-$1)")
	public static int operator_minus(int a) {
		return -a;
	}
	
	/**
	 * The binary plus operator. This is the equivalent to the Java + operator.
	 * 
	 * @param a  an integer.
	 * @param b  a double.
	 * @return   a+b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 + $2)")
	public static double operator_plus(int a, double b) {
		return a + b;
	}
	
	/**
	 * The binary minus operator. This is the equivalent to the Java - operator.
	 * 
	 * @param a  an integer.
	 * @param b  a double.
	 * @return   a-b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 - $2)")
	public static double operator_minus(int a, double b) {
		return a - b;
	}
	
	/**
	 * The binary multiply operator. This is the equivalent to the Java * operator.
	 * 
	 * @param a  an integer.
	 * @param b  a double.
	 * @return   a*b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 * $2)")
	public static double operator_multiply(int a, double b) {
		return a * b;
	}
	
	/**
	 * The binary divide operator. This is the equivalent to the Java / operator.
	 * 
	 * @param a  an integer.
	 * @param b  a double.
	 * @return   a/b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 / $2)")
	public static double operator_divide(int a, double b) {
		return a / b;
	}
	
	/**
	 * The binary modulo operator. This is the equivalent to the Java % operator.
	 * 
	 * @param a  an integer.
	 * @param b  a double.
	 * @return   a%b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 % $2)")
	public static double operator_modulo(int a, double b) {
		return a % b;
	}
	
	/**
	 * The binary lessThan operator. This is the equivalent to the Java < operator.
	 * 
	 * @param a  an integer.
	 * @param b  a double.
	 * @return   a<b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 < $2)")
	public static boolean operator_lessThan(int a, double b) {
		return a < b;
	}
	
	/**
	 * The binary lessEqualsThan operator. This is the equivalent to the Java <= operator.
	 * 
	 * @param a  an integer.
	 * @param b  a double.
	 * @return   a<=b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 <= $2)")
	public static boolean operator_lessEqualsThan(int a, double b) {
		return a <= b;
	}
	
	/**
	 * The binary greaterThan operator. This is the equivalent to the Java > operator.
	 * 
	 * @param a  an integer.
	 * @param b  a double.
	 * @return   a>b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 > $2)")
	public static boolean operator_greaterThan(int a, double b) {
		return a > b;
	}
	
	/**
	 * The binary greaterEqualsThan operator. This is the equivalent to the Java >= operator.
	 * 
	 * @param a  an integer.
	 * @param b  a double.
	 * @return   a>=b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 >= $2)")
	public static boolean operator_greaterEqualsThan(int a, double b) {
		return a >= b;
	}
	
	/**
	 * The binary equals operator. This is the equivalent to the Java == operator.
	 * 
	 * @param a  an integer.
	 * @param b  a double.
	 * @return   a==b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 == $2)")
	public static boolean operator_equals(int a, double b) {
		return a == b;
	}
	
	/**
	 * The binary notEquals operator. This is the equivalent to the Java != operator.
	 * 
	 * @param a  an integer.
	 * @param b  a double.
	 * @return   a!=b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 != $2)")
	public static boolean operator_notEquals(int a, double b) {
		return a != b;
	}
	
	/**
	 * The binary power operator. This is the equivalent to the Java's Math.pow() function.
	 * 
	 * @param a  an integer.
	 * @param b  a double.
	 * @return   Math.pow(a, b)
	 * @since 2.3
	 */
	@Pure
	@Inline(value="$3.pow($1, $2)", imported=Math.class)
	public static double operator_power(int a, double b) {
		return Math.pow(a, b);
	}
	
	/**
	 * The binary plus operator. This is the equivalent to the Java + operator.
	 * 
	 * @param a  an integer.
	 * @param b  a float.
	 * @return   a+b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 + $2)")
	public static float operator_plus(int a, float b) {
		return a + b;
	}
	
	/**
	 * The binary minus operator. This is the equivalent to the Java - operator.
	 * 
	 * @param a  an integer.
	 * @param b  a float.
	 * @return   a-b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 - $2)")
	public static float operator_minus(int a, float b) {
		return a - b;
	}
	
	/**
	 * The binary multiply operator. This is the equivalent to the Java * operator.
	 * 
	 * @param a  an integer.
	 * @param b  a float.
	 * @return   a*b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 * $2)")
	public static float operator_multiply(int a, float b) {
		return a * b;
	}
	
	/**
	 * The binary divide operator. This is the equivalent to the Java / operator.
	 * 
	 * @param a  an integer.
	 * @param b  a float.
	 * @return   a/b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 / $2)")
	public static float operator_divide(int a, float b) {
		return a / b;
	}
	
	/**
	 * The binary modulo operator. This is the equivalent to the Java % operator.
	 * 
	 * @param a  an integer.
	 * @param b  a float.
	 * @return   a%b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 % $2)")
	public static float operator_modulo(int a, float b) {
		return a % b;
	}
	
	/**
	 * The binary lessThan operator. This is the equivalent to the Java < operator.
	 * 
	 * @param a  an integer.
	 * @param b  a float.
	 * @return   a<b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 < $2)")
	public static boolean operator_lessThan(int a, float b) {
		return a < b;
	}
	
	/**
	 * The binary lessEqualsThan operator. This is the equivalent to the Java <= operator.
	 * 
	 * @param a  an integer.
	 * @param b  a float.
	 * @return   a<=b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 <= $2)")
	public static boolean operator_lessEqualsThan(int a, float b) {
		return a <= b;
	}
	
	/**
	 * The binary greaterThan operator. This is the equivalent to the Java > operator.
	 * 
	 * @param a  an integer.
	 * @param b  a float.
	 * @return   a>b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 > $2)")
	public static boolean operator_greaterThan(int a, float b) {
		return a > b;
	}
	
	/**
	 * The binary greaterEqualsThan operator. This is the equivalent to the Java >= operator.
	 * 
	 * @param a  an integer.
	 * @param b  a float.
	 * @return   a>=b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 >= $2)")
	public static boolean operator_greaterEqualsThan(int a, float b) {
		return a >= b;
	}
	
	/**
	 * The binary equals operator. This is the equivalent to the Java == operator.
	 * 
	 * @param a  an integer.
	 * @param b  a float.
	 * @return   a==b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 == $2)")
	public static boolean operator_equals(int a, float b) {
		return a == b;
	}
	
	/**
	 * The binary notEquals operator. This is the equivalent to the Java != operator.
	 * 
	 * @param a  an integer.
	 * @param b  a float.
	 * @return   a!=b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 != $2)")
	public static boolean operator_notEquals(int a, float b) {
		return a != b;
	}
	
	/**
	 * The binary power operator. This is the equivalent to the Java's Math.pow() function.
	 * 
	 * @param a  an integer.
	 * @param b  a float.
	 * @return   Math.pow(a, b)
	 * @since 2.3
	 */
	@Pure
	@Inline(value="$3.pow($1, $2)", imported=Math.class)
	public static double operator_power(int a, float b) {
		return Math.pow(a, b);
	}
	
	/**
	 * The binary plus operator. This is the equivalent to the Java + operator.
	 * 
	 * @param a  an integer.
	 * @param b  a long.
	 * @return   a+b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 + $2)")
	public static long operator_plus(int a, long b) {
		return a + b;
	}
	
	/**
	 * The binary minus operator. This is the equivalent to the Java - operator.
	 * 
	 * @param a  an integer.
	 * @param b  a long.
	 * @return   a-b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 - $2)")
	public static long operator_minus(int a, long b) {
		return a - b;
	}
	
	/**
	 * The binary multiply operator. This is the equivalent to the Java * operator.
	 * 
	 * @param a  an integer.
	 * @param b  a long.
	 * @return   a*b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 * $2)")
	public static long operator_multiply(int a, long b) {
		return a * b;
	}
	
	/**
	 * The binary divide operator. This is the equivalent to the Java / operator.
	 * 
	 * @param a  an integer.
	 * @param b  a long.
	 * @return   a/b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 / $2)")
	public static long operator_divide(int a, long b) {
		return a / b;
	}
	
	/**
	 * The binary modulo operator. This is the equivalent to the Java % operator.
	 * 
	 * @param a  an integer.
	 * @param b  a long.
	 * @return   a%b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 % $2)")
	public static long operator_modulo(int a, long b) {
		return a % b;
	}
	
	/**
	 * The binary lessThan operator. This is the equivalent to the Java < operator.
	 * 
	 * @param a  an integer.
	 * @param b  a long.
	 * @return   a<b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 < $2)")
	public static boolean operator_lessThan(int a, long b) {
		return a < b;
	}
	
	/**
	 * The binary lessEqualsThan operator. This is the equivalent to the Java <= operator.
	 * 
	 * @param a  an integer.
	 * @param b  a long.
	 * @return   a<=b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 <= $2)")
	public static boolean operator_lessEqualsThan(int a, long b) {
		return a <= b;
	}
	
	/**
	 * The binary greaterThan operator. This is the equivalent to the Java > operator.
	 * 
	 * @param a  an integer.
	 * @param b  a long.
	 * @return   a>b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 > $2)")
	public static boolean operator_greaterThan(int a, long b) {
		return a > b;
	}
	
	/**
	 * The binary greaterEqualsThan operator. This is the equivalent to the Java >= operator.
	 * 
	 * @param a  an integer.
	 * @param b  a long.
	 * @return   a>=b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 >= $2)")
	public static boolean operator_greaterEqualsThan(int a, long b) {
		return a >= b;
	}
	
	/**
	 * The binary equals operator. This is the equivalent to the Java == operator.
	 * 
	 * @param a  an integer.
	 * @param b  a long.
	 * @return   a==b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 == $2)")
	public static boolean operator_equals(int a, long b) {
		return a == b;
	}
	
	/**
	 * The binary notEquals operator. This is the equivalent to the Java != operator.
	 * 
	 * @param a  an integer.
	 * @param b  a long.
	 * @return   a!=b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 != $2)")
	public static boolean operator_notEquals(int a, long b) {
		return a != b;
	}
	
	/**
	 * The binary power operator. This is the equivalent to the Java's Math.pow() function.
	 * 
	 * @param a  an integer.
	 * @param b  a long.
	 * @return   Math.pow(a, b)
	 * @since 2.3
	 */
	@Pure
	@Inline(value="$3.pow($1, $2)", imported=Math.class)
	public static double operator_power(int a, long b) {
		return Math.pow(a, b);
	}
	
	/**
	 * The binary plus operator. This is the equivalent to the Java + operator.
	 * 
	 * @param a  an integer.
	 * @param b  an integer.
	 * @return   a+b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 + $2)")
	public static int operator_plus(int a, int b) {
		return a + b;
	}
	
	/**
	 * The binary minus operator. This is the equivalent to the Java - operator.
	 * 
	 * @param a  an integer.
	 * @param b  an integer.
	 * @return   a-b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 - $2)")
	public static int operator_minus(int a, int b) {
		return a - b;
	}
	
	/**
	 * The binary multiply operator. This is the equivalent to the Java * operator.
	 * 
	 * @param a  an integer.
	 * @param b  an integer.
	 * @return   a*b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 * $2)")
	public static int operator_multiply(int a, int b) {
		return a * b;
	}
	
	/**
	 * The binary divide operator. This is the equivalent to the Java / operator.
	 * 
	 * @param a  an integer.
	 * @param b  an integer.
	 * @return   a/b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 / $2)")
	public static int operator_divide(int a, int b) {
		return a / b;
	}
	
	/**
	 * The binary modulo operator. This is the equivalent to the Java % operator.
	 * 
	 * @param a  an integer.
	 * @param b  an integer.
	 * @return   a%b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 % $2)")
	public static int operator_modulo(int a, int b) {
		return a % b;
	}
	
	/**
	 * The binary lessThan operator. This is the equivalent to the Java < operator.
	 * 
	 * @param a  an integer.
	 * @param b  an integer.
	 * @return   a<b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 < $2)")
	public static boolean operator_lessThan(int a, int b) {
		return a < b;
	}
	
	/**
	 * The binary lessEqualsThan operator. This is the equivalent to the Java <= operator.
	 * 
	 * @param a  an integer.
	 * @param b  an integer.
	 * @return   a<=b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 <= $2)")
	public static boolean operator_lessEqualsThan(int a, int b) {
		return a <= b;
	}
	
	/**
	 * The binary greaterThan operator. This is the equivalent to the Java > operator.
	 * 
	 * @param a  an integer.
	 * @param b  an integer.
	 * @return   a>b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 > $2)")
	public static boolean operator_greaterThan(int a, int b) {
		return a > b;
	}
	
	/**
	 * The binary greaterEqualsThan operator. This is the equivalent to the Java >= operator.
	 * 
	 * @param a  an integer.
	 * @param b  an integer.
	 * @return   a>=b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 >= $2)")
	public static boolean operator_greaterEqualsThan(int a, int b) {
		return a >= b;
	}
	
	/**
	 * The binary equals operator. This is the equivalent to the Java == operator.
	 * 
	 * @param a  an integer.
	 * @param b  an integer.
	 * @return   a==b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 == $2)")
	public static boolean operator_equals(int a, int b) {
		return a == b;
	}
	
	/**
	 * The binary notEquals operator. This is the equivalent to the Java != operator.
	 * 
	 * @param a  an integer.
	 * @param b  an integer.
	 * @return   a!=b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 != $2)")
	public static boolean operator_notEquals(int a, int b) {
		return a != b;
	}
	
	/**
	 * The binary power operator. This is the equivalent to the Java's Math.pow() function.
	 * 
	 * @param a  an integer.
	 * @param b  an integer.
	 * @return   Math.pow(a, b)
	 * @since 2.3
	 */
	@Pure
	@Inline(value="$3.pow($1, $2)", imported=Math.class)
	public static double operator_power(int a, int b) {
		return Math.pow(a, b);
	}
	
	/**
	 * The binary plus operator. This is the equivalent to the Java + operator.
	 * 
	 * @param a  an integer.
	 * @param b  a character.
	 * @return   a+b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 + $2)")
	public static int operator_plus(int a, char b) {
		return a + b;
	}
	
	/**
	 * The binary minus operator. This is the equivalent to the Java - operator.
	 * 
	 * @param a  an integer.
	 * @param b  a character.
	 * @return   a-b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 - $2)")
	public static int operator_minus(int a, char b) {
		return a - b;
	}
	
	/**
	 * The binary multiply operator. This is the equivalent to the Java * operator.
	 * 
	 * @param a  an integer.
	 * @param b  a character.
	 * @return   a*b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 * $2)")
	public static int operator_multiply(int a, char b) {
		return a * b;
	}
	
	/**
	 * The binary divide operator. This is the equivalent to the Java / operator.
	 * 
	 * @param a  an integer.
	 * @param b  a character.
	 * @return   a/b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 / $2)")
	public static int operator_divide(int a, char b) {
		return a / b;
	}
	
	/**
	 * The binary modulo operator. This is the equivalent to the Java % operator.
	 * 
	 * @param a  an integer.
	 * @param b  a character.
	 * @return   a%b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 % $2)")
	public static int operator_modulo(int a, char b) {
		return a % b;
	}
	
	/**
	 * The binary lessThan operator. This is the equivalent to the Java < operator.
	 * 
	 * @param a  an integer.
	 * @param b  a character.
	 * @return   a<b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 < $2)")
	public static boolean operator_lessThan(int a, char b) {
		return a < b;
	}
	
	/**
	 * The binary lessEqualsThan operator. This is the equivalent to the Java <= operator.
	 * 
	 * @param a  an integer.
	 * @param b  a character.
	 * @return   a<=b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 <= $2)")
	public static boolean operator_lessEqualsThan(int a, char b) {
		return a <= b;
	}
	
	/**
	 * The binary greaterThan operator. This is the equivalent to the Java > operator.
	 * 
	 * @param a  an integer.
	 * @param b  a character.
	 * @return   a>b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 > $2)")
	public static boolean operator_greaterThan(int a, char b) {
		return a > b;
	}
	
	/**
	 * The binary greaterEqualsThan operator. This is the equivalent to the Java >= operator.
	 * 
	 * @param a  an integer.
	 * @param b  a character.
	 * @return   a>=b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 >= $2)")
	public static boolean operator_greaterEqualsThan(int a, char b) {
		return a >= b;
	}
	
	/**
	 * The binary equals operator. This is the equivalent to the Java == operator.
	 * 
	 * @param a  an integer.
	 * @param b  a character.
	 * @return   a==b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 == $2)")
	public static boolean operator_equals(int a, char b) {
		return a == b;
	}
	
	/**
	 * The binary notEquals operator. This is the equivalent to the Java != operator.
	 * 
	 * @param a  an integer.
	 * @param b  a character.
	 * @return   a!=b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 != $2)")
	public static boolean operator_notEquals(int a, char b) {
		return a != b;
	}
	
	/**
	 * The binary power operator. This is the equivalent to the Java's Math.pow() function.
	 * 
	 * @param a  an integer.
	 * @param b  a character.
	 * @return   Math.pow(a, b)
	 * @since 2.3
	 */
	@Pure
	@Inline(value="$3.pow($1, $2)", imported=Math.class)
	public static double operator_power(int a, char b) {
		return Math.pow(a, b);
	}
	
	/**
	 * The binary plus operator. This is the equivalent to the Java + operator.
	 * 
	 * @param a  an integer.
	 * @param b  a short.
	 * @return   a+b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 + $2)")
	public static int operator_plus(int a, short b) {
		return a + b;
	}
	
	/**
	 * The binary minus operator. This is the equivalent to the Java - operator.
	 * 
	 * @param a  an integer.
	 * @param b  a short.
	 * @return   a-b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 - $2)")
	public static int operator_minus(int a, short b) {
		return a - b;
	}
	
	/**
	 * The binary multiply operator. This is the equivalent to the Java * operator.
	 * 
	 * @param a  an integer.
	 * @param b  a short.
	 * @return   a*b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 * $2)")
	public static int operator_multiply(int a, short b) {
		return a * b;
	}
	
	/**
	 * The binary divide operator. This is the equivalent to the Java / operator.
	 * 
	 * @param a  an integer.
	 * @param b  a short.
	 * @return   a/b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 / $2)")
	public static int operator_divide(int a, short b) {
		return a / b;
	}
	
	/**
	 * The binary modulo operator. This is the equivalent to the Java % operator.
	 * 
	 * @param a  an integer.
	 * @param b  a short.
	 * @return   a%b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 % $2)")
	public static int operator_modulo(int a, short b) {
		return a % b;
	}
	
	/**
	 * The binary lessThan operator. This is the equivalent to the Java < operator.
	 * 
	 * @param a  an integer.
	 * @param b  a short.
	 * @return   a<b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 < $2)")
	public static boolean operator_lessThan(int a, short b) {
		return a < b;
	}
	
	/**
	 * The binary lessEqualsThan operator. This is the equivalent to the Java <= operator.
	 * 
	 * @param a  an integer.
	 * @param b  a short.
	 * @return   a<=b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 <= $2)")
	public static boolean operator_lessEqualsThan(int a, short b) {
		return a <= b;
	}
	
	/**
	 * The binary greaterThan operator. This is the equivalent to the Java > operator.
	 * 
	 * @param a  an integer.
	 * @param b  a short.
	 * @return   a>b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 > $2)")
	public static boolean operator_greaterThan(int a, short b) {
		return a > b;
	}
	
	/**
	 * The binary greaterEqualsThan operator. This is the equivalent to the Java >= operator.
	 * 
	 * @param a  an integer.
	 * @param b  a short.
	 * @return   a>=b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 >= $2)")
	public static boolean operator_greaterEqualsThan(int a, short b) {
		return a >= b;
	}
	
	/**
	 * The binary equals operator. This is the equivalent to the Java == operator.
	 * 
	 * @param a  an integer.
	 * @param b  a short.
	 * @return   a==b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 == $2)")
	public static boolean operator_equals(int a, short b) {
		return a == b;
	}
	
	/**
	 * The binary notEquals operator. This is the equivalent to the Java != operator.
	 * 
	 * @param a  an integer.
	 * @param b  a short.
	 * @return   a!=b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 != $2)")
	public static boolean operator_notEquals(int a, short b) {
		return a != b;
	}
	
	/**
	 * The binary power operator. This is the equivalent to the Java's Math.pow() function.
	 * 
	 * @param a  an integer.
	 * @param b  a short.
	 * @return   Math.pow(a, b)
	 * @since 2.3
	 */
	@Pure
	@Inline(value="$3.pow($1, $2)", imported=Math.class)
	public static double operator_power(int a, short b) {
		return Math.pow(a, b);
	}
	
	/**
	 * The binary plus operator. This is the equivalent to the Java + operator.
	 * 
	 * @param a  an integer.
	 * @param b  a byte.
	 * @return   a+b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 + $2)")
	public static int operator_plus(int a, byte b) {
		return a + b;
	}
	
	/**
	 * The binary minus operator. This is the equivalent to the Java - operator.
	 * 
	 * @param a  an integer.
	 * @param b  a byte.
	 * @return   a-b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 - $2)")
	public static int operator_minus(int a, byte b) {
		return a - b;
	}
	
	/**
	 * The binary multiply operator. This is the equivalent to the Java * operator.
	 * 
	 * @param a  an integer.
	 * @param b  a byte.
	 * @return   a*b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 * $2)")
	public static int operator_multiply(int a, byte b) {
		return a * b;
	}
	
	/**
	 * The binary divide operator. This is the equivalent to the Java / operator.
	 * 
	 * @param a  an integer.
	 * @param b  a byte.
	 * @return   a/b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 / $2)")
	public static int operator_divide(int a, byte b) {
		return a / b;
	}
	
	/**
	 * The binary modulo operator. This is the equivalent to the Java % operator.
	 * 
	 * @param a  an integer.
	 * @param b  a byte.
	 * @return   a%b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 % $2)")
	public static int operator_modulo(int a, byte b) {
		return a % b;
	}
	
	/**
	 * The binary lessThan operator. This is the equivalent to the Java < operator.
	 * 
	 * @param a  an integer.
	 * @param b  a byte.
	 * @return   a<b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 < $2)")
	public static boolean operator_lessThan(int a, byte b) {
		return a < b;
	}
	
	/**
	 * The binary lessEqualsThan operator. This is the equivalent to the Java <= operator.
	 * 
	 * @param a  an integer.
	 * @param b  a byte.
	 * @return   a<=b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 <= $2)")
	public static boolean operator_lessEqualsThan(int a, byte b) {
		return a <= b;
	}
	
	/**
	 * The binary greaterThan operator. This is the equivalent to the Java > operator.
	 * 
	 * @param a  an integer.
	 * @param b  a byte.
	 * @return   a>b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 > $2)")
	public static boolean operator_greaterThan(int a, byte b) {
		return a > b;
	}
	
	/**
	 * The binary greaterEqualsThan operator. This is the equivalent to the Java >= operator.
	 * 
	 * @param a  an integer.
	 * @param b  a byte.
	 * @return   a>=b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 >= $2)")
	public static boolean operator_greaterEqualsThan(int a, byte b) {
		return a >= b;
	}
	
	/**
	 * The binary equals operator. This is the equivalent to the Java == operator.
	 * 
	 * @param a  an integer.
	 * @param b  a byte.
	 * @return   a==b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 == $2)")
	public static boolean operator_equals(int a, byte b) {
		return a == b;
	}
	
	/**
	 * The binary notEquals operator. This is the equivalent to the Java != operator.
	 * 
	 * @param a  an integer.
	 * @param b  a byte.
	 * @return   a!=b
	 * @since 2.3
	 */
	@Pure
	@Inline("($1 != $2)")
	public static boolean operator_notEquals(int a, byte b) {
		return a != b;
	}
	
	/**
	 * The binary power operator. This is the equivalent to the Java's Math.pow() function.
	 * 
	 * @param a  an integer.
	 * @param b  a byte.
	 * @return   Math.pow(a, b)
	 * @since 2.3
	 */
	@Pure
	@Inline(value="$3.pow($1, $2)", imported=Math.class)
	public static double operator_power(int a, byte b) {
		return Math.pow(a, b);
	}
	
	// END generated code




}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy