From d4ca769e542b2489b1e23cfcbdc3a0b7275b87cd Mon Sep 17 00:00:00 2001 From: Ben Culkin Date: Mon, 13 Apr 2020 18:40:41 -0400 Subject: Cleanup pass Cleanup pass to uniformize things --- .../main/java/bjc/utils/math/CardinalState.java | 25 +++++++++++----------- 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'base/src/main/java/bjc/utils/math/CardinalState.java') diff --git a/base/src/main/java/bjc/utils/math/CardinalState.java b/base/src/main/java/bjc/utils/math/CardinalState.java index 3c97b68..de2224c 100644 --- a/base/src/main/java/bjc/utils/math/CardinalState.java +++ b/base/src/main/java/bjc/utils/math/CardinalState.java @@ -7,21 +7,21 @@ import java.util.function.LongPredicate; /* * @TODO 2/12/18 Ben Culkin :AdditionalCardinals - * + * * Add some built-in implementations for various things. * * By this, I mean for various unit scales, like custom and metric weights */ /** * Customizations for number cardinalization. - * + * * @author EVE * */ public class CardinalState { /** * Alias type for converting numbers to cardinals. - * + * * @author EVE * */ @@ -44,31 +44,32 @@ public class CardinalState { /** * Create a new set of cardinalization customizations. - * + * * @param customNumbers - * The custom numbers to use. + * The custom numbers to use. * @param customScales - * The custom scales to use. + * The custom scales to use. */ - public CardinalState(Map customNumbers, Map customScales) { + public CardinalState(Map customNumbers, + Map customScales) { this.customNumbers = customNumbers; this.customScales = customScales; } /** * Handle a custom cardinal number - * + * * @param number - * The number to handle + * The number to handle * @return The number as a cardinal, or null if we don't handle it. */ public String handleCustom(long number) { - if(customNumbers.containsKey(number)) { + if (customNumbers.containsKey(number)) { return customNumbers.get(number); } - for(Entry ent : customScales.entrySet()) { - if(ent.getKey().test(number)) { + for (Entry ent : customScales.entrySet()) { + if (ent.getKey().test(number)) { return ent.getValue().apply(number, this); } } -- cgit v1.2.3