From 26291e672b0e683edc9d57710a9a9d96ca199c45 Mon Sep 17 00:00:00 2001 From: Adrien Hopkins Date: Sun, 24 Mar 2024 13:14:11 -0500 Subject: Format source code & set explicit UTF-8 --- src/main/java/sevenUnitsGUI/DefaultPrefixRepetitionRule.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/main/java/sevenUnitsGUI/DefaultPrefixRepetitionRule.java') diff --git a/src/main/java/sevenUnitsGUI/DefaultPrefixRepetitionRule.java b/src/main/java/sevenUnitsGUI/DefaultPrefixRepetitionRule.java index b56356d..1fb2709 100644 --- a/src/main/java/sevenUnitsGUI/DefaultPrefixRepetitionRule.java +++ b/src/main/java/sevenUnitsGUI/DefaultPrefixRepetitionRule.java @@ -45,16 +45,16 @@ public enum DefaultPrefixRepetitionRule implements Predicate> { } else { magnifying = false; } - + // if the first prefix is non-metric (including binary prefixes), // assume we are using non-metric prefixes // non-metric prefixes are allowed, but can't be repeated. if (!Metric.DECIMAL_PREFIXES.contains(prefixes.get(0))) return NO_REPETITION.test(prefixes); - + int part = 0; // 0=yotta/yoctos, 1=kilo-zetta/milli-zepto, // 2=deka,hecto,deci,centi - + for (final UnitPrefix prefix : prefixes) { // check that the current prefix is metric and appropriately // magnifying/reducing @@ -62,7 +62,7 @@ public enum DefaultPrefixRepetitionRule implements Predicate> { return false; if (magnifying != prefix.getMultiplier() > 1) return false; - + // check if the current prefix is correct // since part is set *after* this check, part designates the state // of the *previous* prefix @@ -79,7 +79,7 @@ public enum DefaultPrefixRepetitionRule implements Predicate> { // deka/hecto must be the last prefix, so this is always invalid return false; } - + // set part if (Metric.YOTTA.equals(prefix) || Metric.YOCTO.equals(prefix)) { part = 0; -- cgit v1.2.3