Short class
A wrapper class for int representing a 16-bit signed integer.
This class wraps a short integer value and provides Java-like functionality similar to Java's Short class.
Example usage:
Short s1 = Short(32767);
Short s2 = Short.parseShort("1000");
Short s3 = Short.valueOf(-32768);
print(s1.toString()); // "32767"
print(s1.toUnsigned()); // 32767
- Implemented types
Properties
Methods
-
abs(
) → Short - Returns the absolute value of this Short.
-
compareTo(
Short other) → int -
Compares this Short with another Short.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
Returns a string representation of this Short.
override
-
toUnsigned(
) → int - Returns the unsigned representation of this short (0-65535).
Operators
-
operator %(
Short other) → Short -
operator *(
Short other) → Short -
operator +(
Short other) → Short - Arithmetic and comparison operators
-
operator -(
Short other) → Short -
operator <(
Short other) → bool -
operator <=(
Short other) → bool -
operator ==(
Object other) → bool -
Returns true if this Short equals the specified object.
override
-
operator >(
Short other) → bool -
operator >=(
Short other) → bool -
operator unary-(
) → Short -
operator ~/(
Short other) → Short