Class org.as2lib.data.type.NaturalNumberIncludingZero

Description

NaturalNumberIncludingZero represents a natural number including zero.

Natural numbers are positive integers including 0. If you do not want to allow 0 use NaturalNumber instead.

See Also

Field Index

Inherited from Number

MAX_VALUE, MIN_VALUE, NaN, NEGATIVE_INFINITY, POSITIVE_INFINITY

Method Index

new NaturalNumberIncludingZero()

Inherited from Integer

Constructor Detail

NaturalNumberIncludingZero

public function NaturalNumberIncludingZero(number:Number)

Constructs a new NaturalNumberIncludingZero instance.

Decimal places are cropped from the passed-in number if it has at least one. The passed-in number must also not be negative.

Parameters

numberthe natural number

Throws

NumberFormatExceptionif the passed-in number is negative number or (-)infinity