Integer
ClassObjects of Integer
class represent signed and unsigned
integers of the C types int
and long int
.
value
The value is the formatted representation of the receiver.
!=
(int
i)
Return TRUE
if the receiver and the argument are not equal, FALSE
otherwise.
&
(int
i)
As a binary operator, perform a bitwise and of the receiver
and the argument. The Object
class’s &
method
overloads C’s unary “address of” prefix operator. See Object.
%
(int
i)
Return an Integer
that is the modulus of the receiver and the
argument.
%=
(int
i)
Perform a modulus of the receiver and its argument, and store the result in the receiver. Returns the receiver.
&&
(int
i)
Return TRUE
if the receiver and the argument evaluate to TRUE.
&=
(Integer
i)
Perform a bitwise and of the receiver and the argument, and assign the result to the receiver.
+
(int
i)
Add i and the receiver, as in this example.
++
(void
)
Postfix and prefix increment operators for Integer
objects.
+=
(int
arg)
Add the value of arg to the receiver.
-
(int
i)
Subtract i from the receiver.
-
(void
)
When used as a unary minus prefix operator, negate the expression.
--
(void
)
Postfix and prefix decrement operators for Integer
objects.
-=
(Integer
arg)
Subtract the value of arg from the receiver.
*
(int
i)
Multiply the receiver by i.
*=
(int
arg)
Multiply the receiver by arg.
/
(int
i)
Divide the receiver by i.
/=
(int
arg)
Divide the receiver by arg.
<
(int
i)
Return TRUE
if the receiver is less than the argument, FALSE
otherwise.
<<
(int
i)
Perform an arithmetic left shift on the receiver by the number of bits in the argument.
<=
(int
i)
Return TRUE
if the receiver is less than or equal to the argument,
FALSE
otherwise.
=
(int
i)
Set the value of the receiver object to i. Also checks for
Symbol
pointer contexts and other aliases.
intObject = 2; resultInt = intObject + intObject;
==
(int
i)
Return TRUE
if the receiver and the argument are equal, FALSE
otherwise.
>
(int
i)
Return TRUE
if the receiver is greater than the argument, FALSE
otherwise.
>=
(int
i)
Return TRUE
if the receiver is greater than or equal to the argument,
FALSE
otherwise.
>>
(int
i)
Perform an arithmetic right shift on the receiver by the number of bits in the argument.
^
(int
i)
Return the result of a bitwise xor of the receiver and its argument.
^=
(int
i)
Preform a bitwise xor of the receiver with its argument, and assign the value to the receiver. Returns the receiver.
bitComp
(int
i)
Return the bitwise complement of the receiver.
invert
(void
)
Return TRUE
if the receiver evaluates to FALSE,
FALSE
if the receiver
evaluates to TRUE.
|
(int
i)
Perform a bitwise or of the receiver and the argument.
|=
(Integer
i)
Perform a bitwise or of the receiver and the argument, and assign the result to the receiver.
||
(int
i)
Return TRUE
if either the receiver or the argument, or both,
evaluate to TRUE.
^
(int
i)
Perform a bitwise exclusive or of the receiver and the argument.
Returns a String
formatted as a decimal or hexadecimal integer.
The asString
method is a synonym for asDecimalString
.
~
(void
)
When used to overload C’s ‘~’ operator, is synonymous
with the bitComp
method, above.