Class RoundingModeNames
java.lang.Object
dev.frostlake.functions.scalar.math.RoundingModeNames
The words ROUND's optional third argument takes. Two, and only two:
HALF_AWAY_FROM_ZERO —
the default, which rounds a tie away from zero — and HALF_TO_EVEN, banker's rounding. The
comparison is case-insensitive, live-verified in both cases, and nothing is trimmed: a word with a
space on either side names no mode.
Kept beside Round, which reads the same argument to pick a RoundingMode, and
shared with the compile-time check that refuses anything else: the two must agree about what a mode
IS, or a word one accepts would be refused by the other.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisRoundingMode(String written) Whetherwrittennames a rounding mode.
-
Method Details
-
isRoundingMode
Whetherwrittennames a rounding mode.- Parameters:
written- the argument as it was written, quotes already removed- Returns:
- whether it is one of the two words
-