|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.xtext.xbase.lib.IntegerExtensions
public class IntegerExtensions
This is an extension library for integral numbers
, e.g. int
or Integer
.
Constructor Summary | |
---|---|
IntegerExtensions()
|
Method Summary | |
---|---|
static int |
bitwiseAnd(int a,
int b)
The bitwise and operation. |
static int |
bitwiseNot(int a)
The bitwise complement operation. |
static int |
bitwiseOr(int a,
int b)
The bitwise inclusive or operation. |
static int |
bitwiseXor(int a,
int b)
The bitwise exclusive or operation. |
static int |
operator_divide(int a,
byte b)
The binary divide operator. |
static int |
operator_divide(int a,
char b)
The binary divide operator. |
static double |
operator_divide(int a,
double b)
The binary divide operator. |
static float |
operator_divide(int a,
float b)
The binary divide operator. |
static int |
operator_divide(int a,
int b)
The binary divide operator. |
static long |
operator_divide(int a,
long b)
The binary divide operator. |
static int |
operator_divide(int a,
short b)
The binary divide operator. |
static int |
operator_doubleGreaterThan(int a,
int distance)
The binary signed right sift operator. |
static int |
operator_doubleLessThan(int a,
int distance)
The binary signed left shift operator. |
static boolean |
operator_equals(int a,
byte b)
The binary equals operator. |
static boolean |
operator_equals(int a,
char b)
The binary equals operator. |
static boolean |
operator_equals(int a,
double b)
The binary equals operator. |
static boolean |
operator_equals(int a,
float b)
The binary equals operator. |
static boolean |
operator_equals(int a,
int b)
The binary equals operator. |
static boolean |
operator_equals(int a,
long b)
The binary equals operator. |
static boolean |
operator_equals(int a,
short b)
The binary equals operator. |
static boolean |
operator_greaterEqualsThan(int a,
byte b)
The binary greaterEqualsThan operator. |
static boolean |
operator_greaterEqualsThan(int a,
char b)
The binary greaterEqualsThan operator. |
static boolean |
operator_greaterEqualsThan(int a,
double b)
The binary greaterEqualsThan operator. |
static boolean |
operator_greaterEqualsThan(int a,
float b)
The binary greaterEqualsThan operator. |
static boolean |
operator_greaterEqualsThan(int a,
int b)
The binary greaterEqualsThan operator. |
static boolean |
operator_greaterEqualsThan(int a,
long b)
The binary greaterEqualsThan operator. |
static boolean |
operator_greaterEqualsThan(int a,
short b)
The binary greaterEqualsThan operator. |
static boolean |
operator_greaterThan(int a,
byte b)
The binary greaterThan operator. |
static boolean |
operator_greaterThan(int a,
char b)
The binary greaterThan operator. |
static boolean |
operator_greaterThan(int a,
double b)
The binary greaterThan operator. |
static boolean |
operator_greaterThan(int a,
float b)
The binary greaterThan operator. |
static boolean |
operator_greaterThan(int a,
int b)
The binary greaterThan operator. |
static boolean |
operator_greaterThan(int a,
long b)
The binary greaterThan operator. |
static boolean |
operator_greaterThan(int a,
short b)
The binary greaterThan operator. |
static boolean |
operator_lessEqualsThan(int a,
byte b)
The binary lessEqualsThan operator. |
static boolean |
operator_lessEqualsThan(int a,
char b)
The binary lessEqualsThan operator. |
static boolean |
operator_lessEqualsThan(int a,
double b)
The binary lessEqualsThan operator. |
static boolean |
operator_lessEqualsThan(int a,
float b)
The binary lessEqualsThan operator. |
static boolean |
operator_lessEqualsThan(int a,
int b)
The binary lessEqualsThan operator. |
static boolean |
operator_lessEqualsThan(int a,
long b)
The binary lessEqualsThan operator. |
static boolean |
operator_lessEqualsThan(int a,
short b)
The binary lessEqualsThan operator. |
static boolean |
operator_lessThan(int a,
byte b)
The binary lessThan operator. |
static boolean |
operator_lessThan(int a,
char b)
The binary lessThan operator. |
static boolean |
operator_lessThan(int a,
double b)
The binary lessThan operator. |
static boolean |
operator_lessThan(int a,
float b)
The binary lessThan operator. |
static boolean |
operator_lessThan(int a,
int b)
The binary lessThan operator. |
static boolean |
operator_lessThan(int a,
long b)
The binary lessThan operator. |
static boolean |
operator_lessThan(int a,
short b)
The binary lessThan operator. |
static int |
operator_minus(int a)
The unary minus operator. |
static int |
operator_minus(int a,
byte b)
The binary minus operator. |
static int |
operator_minus(int a,
char b)
The binary minus operator. |
static double |
operator_minus(int a,
double b)
The binary minus operator. |
static float |
operator_minus(int a,
float b)
The binary minus operator. |
static int |
operator_minus(int a,
int b)
The binary minus operator. |
static long |
operator_minus(int a,
long b)
The binary minus operator. |
static int |
operator_minus(int a,
short b)
The binary minus operator. |
static int |
operator_modulo(int a,
byte b)
The binary modulo operator. |
static int |
operator_modulo(int a,
char b)
The binary modulo operator. |
static double |
operator_modulo(int a,
double b)
The binary modulo operator. |
static float |
operator_modulo(int a,
float b)
The binary modulo operator. |
static int |
operator_modulo(int a,
int b)
The binary modulo operator. |
static long |
operator_modulo(int a,
long b)
The binary modulo operator. |
static int |
operator_modulo(int a,
short b)
The binary modulo operator. |
static int |
operator_multiply(int a,
byte b)
The binary multiply operator. |
static int |
operator_multiply(int a,
char b)
The binary multiply operator. |
static double |
operator_multiply(int a,
double b)
The binary multiply operator. |
static float |
operator_multiply(int a,
float b)
The binary multiply operator. |
static int |
operator_multiply(int a,
int b)
The binary multiply operator. |
static long |
operator_multiply(int a,
long b)
The binary multiply operator. |
static int |
operator_multiply(int a,
short b)
The binary multiply operator. |
static boolean |
operator_notEquals(int a,
byte b)
The binary notEquals operator. |
static boolean |
operator_notEquals(int a,
char b)
The binary notEquals operator. |
static boolean |
operator_notEquals(int a,
double b)
The binary notEquals operator. |
static boolean |
operator_notEquals(int a,
float b)
The binary notEquals operator. |
static boolean |
operator_notEquals(int a,
int b)
The binary notEquals operator. |
static boolean |
operator_notEquals(int a,
long b)
The binary notEquals operator. |
static boolean |
operator_notEquals(int a,
short b)
The binary notEquals operator. |
static int |
operator_plus(int a,
byte b)
The binary plus operator. |
static int |
operator_plus(int a,
char b)
The binary plus operator. |
static double |
operator_plus(int a,
double b)
The binary plus operator. |
static float |
operator_plus(int a,
float b)
The binary plus operator. |
static int |
operator_plus(int a,
int b)
The binary plus operator. |
static long |
operator_plus(int a,
long b)
The binary plus operator. |
static int |
operator_plus(int a,
short b)
The binary plus operator. |
static double |
operator_power(int a,
byte b)
The binary power operator. |
static double |
operator_power(int a,
char b)
The binary power operator. |
static double |
operator_power(int a,
double b)
The binary power operator. |
static double |
operator_power(int a,
float b)
The binary power operator. |
static double |
operator_power(int a,
int b)
The binary power operator. |
static double |
operator_power(int a,
long b)
The binary power operator. |
static double |
operator_power(int a,
short b)
The binary power operator. |
static int |
operator_tripleGreaterThan(int a,
int distance)
The binary unsigned right shift operator. |
static IntegerRange |
operator_upTo(int a,
int b)
The .. operator yields an IntegerRange . |
static int |
shiftLeft(int a,
int distance)
Deprecated. use operator_doubleLessThan(int, int) instead |
static int |
shiftRight(int a,
int distance)
Deprecated. use operator_doubleGreaterThan(int, int) instead |
static int |
shiftRightUnsigned(int a,
int distance)
Deprecated. use operator_tripleGreaterThan(int, int) instead |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IntegerExtensions()
Method Detail |
---|
public static IntegerRange operator_upTo(int a, int b)
..
operator yields an IntegerRange
.
a
- the start of the range.b
- the end of the range.
IntegerRange
. Never null
.public static int bitwiseOr(int a, int b)
or
operation. This is the equivalent to the java |
operator.
a
- an integer.b
- an integer.
a|b
public static int bitwiseXor(int a, int b)
or
operation. This is the equivalent to the java ^
operator.
a
- an integer.b
- an integer.
a^b
public static int bitwiseAnd(int a, int b)
and
operation. This is the equivalent to the java &
operator.
a
- an integer.b
- an integer.
a&b
public static int bitwiseNot(int a)
~
operator.
a
- an integer.
a
.@Deprecated public static int shiftLeft(int a, int distance)
operator_doubleLessThan(int, int)
instead
signed left shift
operator. This is the equivalent to the java <<
operator.
Fills in a zero as the least significant bit.
a
- an integer.distance
- the number of times to shift.
a<<distance
public static int operator_doubleLessThan(int a, int distance)
signed left shift
operator. This is the equivalent to the java <<
operator.
Fills in a zero as the least significant bit.
a
- an integer.distance
- the number of times to shift.
a<<distance
@Deprecated public static int shiftRight(int a, int distance)
operator_doubleGreaterThan(int, int)
instead
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.
a
- an integer.distance
- the number of times to shift.
a>>distance
public static int operator_doubleGreaterThan(int a, int distance)
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.
a
- an integer.distance
- the number of times to shift.
a>>distance
@Deprecated public static int shiftRightUnsigned(int a, int distance)
operator_tripleGreaterThan(int, int)
instead
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.
a
- an integer.distance
- the number of times to shift.
a>>>distance
public static int operator_tripleGreaterThan(int a, int distance)
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.
a
- an integer.distance
- the number of times to shift.
a>>>distance
public static int operator_minus(int a)
minus
operator. This is the equivalent to the Java's -
function.
a
- an integer.
-a
public static double operator_plus(int a, double b)
plus
operator. This is the equivalent to the Java +
operator.
a
- an integer.b
- a double.
a+b
public static double operator_minus(int a, double b)
minus
operator. This is the equivalent to the Java -
operator.
a
- an integer.b
- a double.
a-b
public static double operator_multiply(int a, double b)
multiply
operator. This is the equivalent to the Java *
operator.
a
- an integer.b
- a double.
a*b
public static double operator_divide(int a, double b)
divide
operator. This is the equivalent to the Java /
operator.
a
- an integer.b
- a double.
a/b
public static double operator_modulo(int a, double b)
modulo
operator. This is the equivalent to the Java %
operator.
a
- an integer.b
- a double.
a%b
public static boolean operator_lessThan(int a, double b)
lessThan
operator. This is the equivalent to the Java <
operator.
a
- an integer.b
- a double.
a<b
public static boolean operator_lessEqualsThan(int a, double b)
lessEqualsThan
operator. This is the equivalent to the Java <=
operator.
a
- an integer.b
- a double.
a<=b
public static boolean operator_greaterThan(int a, double b)
greaterThan
operator. This is the equivalent to the Java >
operator.
a
- an integer.b
- a double.
a>b
public static boolean operator_greaterEqualsThan(int a, double b)
greaterEqualsThan
operator. This is the equivalent to the Java >=
operator.
a
- an integer.b
- a double.
a>=b
public static boolean operator_equals(int a, double b)
equals
operator. This is the equivalent to the Java ==
operator.
a
- an integer.b
- a double.
a==b
public static boolean operator_notEquals(int a, double b)
notEquals
operator. This is the equivalent to the Java !=
operator.
a
- an integer.b
- a double.
a!=b
public static double operator_power(int a, double b)
power
operator. This is the equivalent to the Java's Math.pow()
function.
a
- an integer.b
- a double.
Math.pow(a, b)
public static float operator_plus(int a, float b)
plus
operator. This is the equivalent to the Java +
operator.
a
- an integer.b
- a float.
a+b
public static float operator_minus(int a, float b)
minus
operator. This is the equivalent to the Java -
operator.
a
- an integer.b
- a float.
a-b
public static float operator_multiply(int a, float b)
multiply
operator. This is the equivalent to the Java *
operator.
a
- an integer.b
- a float.
a*b
public static float operator_divide(int a, float b)
divide
operator. This is the equivalent to the Java /
operator.
a
- an integer.b
- a float.
a/b
public static float operator_modulo(int a, float b)
modulo
operator. This is the equivalent to the Java %
operator.
a
- an integer.b
- a float.
a%b
public static boolean operator_lessThan(int a, float b)
lessThan
operator. This is the equivalent to the Java <
operator.
a
- an integer.b
- a float.
a<b
public static boolean operator_lessEqualsThan(int a, float b)
lessEqualsThan
operator. This is the equivalent to the Java <=
operator.
a
- an integer.b
- a float.
a<=b
public static boolean operator_greaterThan(int a, float b)
greaterThan
operator. This is the equivalent to the Java >
operator.
a
- an integer.b
- a float.
a>b
public static boolean operator_greaterEqualsThan(int a, float b)
greaterEqualsThan
operator. This is the equivalent to the Java >=
operator.
a
- an integer.b
- a float.
a>=b
public static boolean operator_equals(int a, float b)
equals
operator. This is the equivalent to the Java ==
operator.
a
- an integer.b
- a float.
a==b
public static boolean operator_notEquals(int a, float b)
notEquals
operator. This is the equivalent to the Java !=
operator.
a
- an integer.b
- a float.
a!=b
public static double operator_power(int a, float b)
power
operator. This is the equivalent to the Java's Math.pow()
function.
a
- an integer.b
- a float.
Math.pow(a, b)
public static long operator_plus(int a, long b)
plus
operator. This is the equivalent to the Java +
operator.
a
- an integer.b
- a long.
a+b
public static long operator_minus(int a, long b)
minus
operator. This is the equivalent to the Java -
operator.
a
- an integer.b
- a long.
a-b
public static long operator_multiply(int a, long b)
multiply
operator. This is the equivalent to the Java *
operator.
a
- an integer.b
- a long.
a*b
public static long operator_divide(int a, long b)
divide
operator. This is the equivalent to the Java /
operator.
a
- an integer.b
- a long.
a/b
public static long operator_modulo(int a, long b)
modulo
operator. This is the equivalent to the Java %
operator.
a
- an integer.b
- a long.
a%b
public static boolean operator_lessThan(int a, long b)
lessThan
operator. This is the equivalent to the Java <
operator.
a
- an integer.b
- a long.
a<b
public static boolean operator_lessEqualsThan(int a, long b)
lessEqualsThan
operator. This is the equivalent to the Java <=
operator.
a
- an integer.b
- a long.
a<=b
public static boolean operator_greaterThan(int a, long b)
greaterThan
operator. This is the equivalent to the Java >
operator.
a
- an integer.b
- a long.
a>b
public static boolean operator_greaterEqualsThan(int a, long b)
greaterEqualsThan
operator. This is the equivalent to the Java >=
operator.
a
- an integer.b
- a long.
a>=b
public static boolean operator_equals(int a, long b)
equals
operator. This is the equivalent to the Java ==
operator.
a
- an integer.b
- a long.
a==b
public static boolean operator_notEquals(int a, long b)
notEquals
operator. This is the equivalent to the Java !=
operator.
a
- an integer.b
- a long.
a!=b
public static double operator_power(int a, long b)
power
operator. This is the equivalent to the Java's Math.pow()
function.
a
- an integer.b
- a long.
Math.pow(a, b)
public static int operator_plus(int a, int b)
plus
operator. This is the equivalent to the Java +
operator.
a
- an integer.b
- an integer.
a+b
public static int operator_minus(int a, int b)
minus
operator. This is the equivalent to the Java -
operator.
a
- an integer.b
- an integer.
a-b
public static int operator_multiply(int a, int b)
multiply
operator. This is the equivalent to the Java *
operator.
a
- an integer.b
- an integer.
a*b
public static int operator_divide(int a, int b)
divide
operator. This is the equivalent to the Java /
operator.
a
- an integer.b
- an integer.
a/b
public static int operator_modulo(int a, int b)
modulo
operator. This is the equivalent to the Java %
operator.
a
- an integer.b
- an integer.
a%b
public static boolean operator_lessThan(int a, int b)
lessThan
operator. This is the equivalent to the Java <
operator.
a
- an integer.b
- an integer.
a<b
public static boolean operator_lessEqualsThan(int a, int b)
lessEqualsThan
operator. This is the equivalent to the Java <=
operator.
a
- an integer.b
- an integer.
a<=b
public static boolean operator_greaterThan(int a, int b)
greaterThan
operator. This is the equivalent to the Java >
operator.
a
- an integer.b
- an integer.
a>b
public static boolean operator_greaterEqualsThan(int a, int b)
greaterEqualsThan
operator. This is the equivalent to the Java >=
operator.
a
- an integer.b
- an integer.
a>=b
public static boolean operator_equals(int a, int b)
equals
operator. This is the equivalent to the Java ==
operator.
a
- an integer.b
- an integer.
a==b
public static boolean operator_notEquals(int a, int b)
notEquals
operator. This is the equivalent to the Java !=
operator.
a
- an integer.b
- an integer.
a!=b
public static double operator_power(int a, int b)
power
operator. This is the equivalent to the Java's Math.pow()
function.
a
- an integer.b
- an integer.
Math.pow(a, b)
public static int operator_plus(int a, char b)
plus
operator. This is the equivalent to the Java +
operator.
a
- an integer.b
- a character.
a+b
public static int operator_minus(int a, char b)
minus
operator. This is the equivalent to the Java -
operator.
a
- an integer.b
- a character.
a-b
public static int operator_multiply(int a, char b)
multiply
operator. This is the equivalent to the Java *
operator.
a
- an integer.b
- a character.
a*b
public static int operator_divide(int a, char b)
divide
operator. This is the equivalent to the Java /
operator.
a
- an integer.b
- a character.
a/b
public static int operator_modulo(int a, char b)
modulo
operator. This is the equivalent to the Java %
operator.
a
- an integer.b
- a character.
a%b
public static boolean operator_lessThan(int a, char b)
lessThan
operator. This is the equivalent to the Java <
operator.
a
- an integer.b
- a character.
a<b
public static boolean operator_lessEqualsThan(int a, char b)
lessEqualsThan
operator. This is the equivalent to the Java <=
operator.
a
- an integer.b
- a character.
a<=b
public static boolean operator_greaterThan(int a, char b)
greaterThan
operator. This is the equivalent to the Java >
operator.
a
- an integer.b
- a character.
a>b
public static boolean operator_greaterEqualsThan(int a, char b)
greaterEqualsThan
operator. This is the equivalent to the Java >=
operator.
a
- an integer.b
- a character.
a>=b
public static boolean operator_equals(int a, char b)
equals
operator. This is the equivalent to the Java ==
operator.
a
- an integer.b
- a character.
a==b
public static boolean operator_notEquals(int a, char b)
notEquals
operator. This is the equivalent to the Java !=
operator.
a
- an integer.b
- a character.
a!=b
public static double operator_power(int a, char b)
power
operator. This is the equivalent to the Java's Math.pow()
function.
a
- an integer.b
- a character.
Math.pow(a, b)
public static int operator_plus(int a, short b)
plus
operator. This is the equivalent to the Java +
operator.
a
- an integer.b
- a short.
a+b
public static int operator_minus(int a, short b)
minus
operator. This is the equivalent to the Java -
operator.
a
- an integer.b
- a short.
a-b
public static int operator_multiply(int a, short b)
multiply
operator. This is the equivalent to the Java *
operator.
a
- an integer.b
- a short.
a*b
public static int operator_divide(int a, short b)
divide
operator. This is the equivalent to the Java /
operator.
a
- an integer.b
- a short.
a/b
public static int operator_modulo(int a, short b)
modulo
operator. This is the equivalent to the Java %
operator.
a
- an integer.b
- a short.
a%b
public static boolean operator_lessThan(int a, short b)
lessThan
operator. This is the equivalent to the Java <
operator.
a
- an integer.b
- a short.
a<b
public static boolean operator_lessEqualsThan(int a, short b)
lessEqualsThan
operator. This is the equivalent to the Java <=
operator.
a
- an integer.b
- a short.
a<=b
public static boolean operator_greaterThan(int a, short b)
greaterThan
operator. This is the equivalent to the Java >
operator.
a
- an integer.b
- a short.
a>b
public static boolean operator_greaterEqualsThan(int a, short b)
greaterEqualsThan
operator. This is the equivalent to the Java >=
operator.
a
- an integer.b
- a short.
a>=b
public static boolean operator_equals(int a, short b)
equals
operator. This is the equivalent to the Java ==
operator.
a
- an integer.b
- a short.
a==b
public static boolean operator_notEquals(int a, short b)
notEquals
operator. This is the equivalent to the Java !=
operator.
a
- an integer.b
- a short.
a!=b
public static double operator_power(int a, short b)
power
operator. This is the equivalent to the Java's Math.pow()
function.
a
- an integer.b
- a short.
Math.pow(a, b)
public static int operator_plus(int a, byte b)
plus
operator. This is the equivalent to the Java +
operator.
a
- an integer.b
- a byte.
a+b
public static int operator_minus(int a, byte b)
minus
operator. This is the equivalent to the Java -
operator.
a
- an integer.b
- a byte.
a-b
public static int operator_multiply(int a, byte b)
multiply
operator. This is the equivalent to the Java *
operator.
a
- an integer.b
- a byte.
a*b
public static int operator_divide(int a, byte b)
divide
operator. This is the equivalent to the Java /
operator.
a
- an integer.b
- a byte.
a/b
public static int operator_modulo(int a, byte b)
modulo
operator. This is the equivalent to the Java %
operator.
a
- an integer.b
- a byte.
a%b
public static boolean operator_lessThan(int a, byte b)
lessThan
operator. This is the equivalent to the Java <
operator.
a
- an integer.b
- a byte.
a<b
public static boolean operator_lessEqualsThan(int a, byte b)
lessEqualsThan
operator. This is the equivalent to the Java <=
operator.
a
- an integer.b
- a byte.
a<=b
public static boolean operator_greaterThan(int a, byte b)
greaterThan
operator. This is the equivalent to the Java >
operator.
a
- an integer.b
- a byte.
a>b
public static boolean operator_greaterEqualsThan(int a, byte b)
greaterEqualsThan
operator. This is the equivalent to the Java >=
operator.
a
- an integer.b
- a byte.
a>=b
public static boolean operator_equals(int a, byte b)
equals
operator. This is the equivalent to the Java ==
operator.
a
- an integer.b
- a byte.
a==b
public static boolean operator_notEquals(int a, byte b)
notEquals
operator. This is the equivalent to the Java !=
operator.
a
- an integer.b
- a byte.
a!=b
public static double operator_power(int a, byte b)
power
operator. This is the equivalent to the Java's Math.pow()
function.
a
- an integer.b
- a byte.
Math.pow(a, b)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |