Class org.as2lib.data.type.NaturalNumber

Description

NaturalNumber represents a natural number.

Natural numbers are positive integers excluding 0 in this case. If you want to allow 0 use NaturalNumberIncludingZero instead.

See Also

Field Index

Inherited from Number

MAX_VALUE, MIN_VALUE, NaN, NEGATIVE_INFINITY, POSITIVE_INFINITY

Method Index

new NaturalNumber()

Inherited from Integer

Constructor Detail

NaturalNumber

public function NaturalNumber(number:Number)

Constructs a new NaturalNumber 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, zero or (-)infinity