Integer constructor
const
Integer(
- int _value
Creates an Integer with the specified value.
value the integer value to wrap
A wrapper class for int that provides Java-like functionality and methods.
This class wraps Dart's primitive int type and provides additional utility methods similar to Java's Integer class, making it easier for Java developers to work with integers in Dart.
Example usage:
Integer a = Integer(42);
Integer b = Integer.valueOf(10);
Integer c = Integer.parseInt("123");
print(a.toString()); // "42"
print(a.compareTo(b)); // 1 (since 42 > 10)
print(Integer.max(a.value, b.value)); // 42
Implementation
const Integer(this._value);