RoundingMode

Methods
7
Fields
8

Getting one

RoundingMode.valueOf(…)
RoundingMode.UP
RoundingMode.DOWN

Methods

MethodReturnsDescription
name()stringThe constant's name as declared.
ordinal()numberThe constant's 0-based position in values().
toString()stringThe constant's printed name; tostring(c) answers the same.
compareTo(RoundingMode)numberThis ordinal less other's.
equals(any)booleanWhether other is this constant. == answers the same.
values(){RoundingMode}Every constant in ordinal order, as a new 1-based array.
valueOf(string)RoundingModeThe constant named name; any other name is an error.

Fields

FieldTypeDescription
UPRoundingModeRoundingMode.UP.
DOWNRoundingModeRoundingMode.DOWN.
CEILINGRoundingModeRoundingMode.CEILING.
FLOORRoundingModeRoundingMode.FLOOR.
HALF_UPRoundingModeRoundingMode.HALF_UP.
HALF_DOWNRoundingModeRoundingMode.HALF_DOWN.
HALF_EVENRoundingModeRoundingMode.HALF_EVEN.
UNNECESSARYRoundingModeRoundingMode.UNNECESSARY.

Returned by

MethodReturnsDescription
DecimalFormat.getRoundingModeRoundingModeThe rounding mode.
RoundingModeClass.valueOfRoundingModeThe constant named name; any other name is an error.
RoundingModeClass.values{RoundingMode}Every constant in ordinal order, as a new 1-based array.

Method details

toString

toString: (RoundingMode) -> string

The constant's printed name; tostring(c) answers the same.

equals

equals: (RoundingMode, any) -> boolean

Whether other is this constant. == answers the same.

values

values: () -> {RoundingMode}

Every constant in ordinal order, as a new 1-based array.