From 2f6a7807f7180fb467e3d06f2af4263a45759c28 Mon Sep 17 00:00:00 2001 From: Ben Culkin Date: Mon, 13 Apr 2020 18:44:24 -0400 Subject: Cleanup pass Pass to do some cleanups --- src/main/java/bjc/inflexion/CardinalState.java | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'src/main/java/bjc/inflexion/CardinalState.java') diff --git a/src/main/java/bjc/inflexion/CardinalState.java b/src/main/java/bjc/inflexion/CardinalState.java index b9867f7..fe42b41 100644 --- a/src/main/java/bjc/inflexion/CardinalState.java +++ b/src/main/java/bjc/inflexion/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