From 7f2a83aea599c0c394137ce7c7813716587704a0 Mon Sep 17 00:00:00 2001 From: arensmac <arencemacalintal@gmail.com> Date: Wed, 30 Oct 2024 19:49:40 -0400 Subject: [PATCH 1/3] Moved constants to the top for better readability --- src/com/jwetherell/algorithms/numbers/Integers.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/com/jwetherell/algorithms/numbers/Integers.java b/src/com/jwetherell/algorithms/numbers/Integers.java index fb86fd3d..9d40d657 100644 --- a/src/com/jwetherell/algorithms/numbers/Integers.java +++ b/src/com/jwetherell/algorithms/numbers/Integers.java @@ -6,6 +6,12 @@ public class Integers { + private static final int BILLION = 1000000000; //moved to the front for better readability + private static final int MILLION = 1000000; + private static final int THOUSAND = 1000; + private static final int HUNDRED = 100; + private static final int TEN = 10; + private static final BigDecimal ZERO = new BigDecimal(0); private static final BigDecimal TWO = new BigDecimal(2); @@ -137,11 +143,7 @@ public static final boolean powerOfTwoUsingBits(int numberToCheck) { multiDigits.put(90,"ninety"); } - private static final int BILLION = 1000000000; - private static final int MILLION = 1000000; - private static final int THOUSAND = 1000; - private static final int HUNDRED = 100; - private static final int TEN = 10; + private static final String handleUnderOneThousand(int number) { StringBuilder builder = new StringBuilder(); From 81ce20bacaa31adb0a31dc4e7481d3cf06e55a02 Mon Sep 17 00:00:00 2001 From: arensmac <arencemacalintal@gmail.com> Date: Wed, 30 Oct 2024 19:53:26 -0400 Subject: [PATCH 2/3] forgot to branch changes --- src/com/jwetherell/algorithms/numbers/Integers.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/jwetherell/algorithms/numbers/Integers.java b/src/com/jwetherell/algorithms/numbers/Integers.java index 9d40d657..222be7aa 100644 --- a/src/com/jwetherell/algorithms/numbers/Integers.java +++ b/src/com/jwetherell/algorithms/numbers/Integers.java @@ -6,7 +6,7 @@ public class Integers { - private static final int BILLION = 1000000000; //moved to the front for better readability + private static final int BILLION = 1000000000; //moved to the front for better readability (forgot to branch lol) private static final int MILLION = 1000000; private static final int THOUSAND = 1000; private static final int HUNDRED = 100; From f0c902f1435756df874b4ae4021de573e096720a Mon Sep 17 00:00:00 2001 From: arensmac <arencemacalintal@gmail.com> Date: Wed, 30 Oct 2024 19:57:33 -0400 Subject: [PATCH 3/3] forgot to switch to branch(lol) --- src/com/jwetherell/algorithms/numbers/Integers.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/jwetherell/algorithms/numbers/Integers.java b/src/com/jwetherell/algorithms/numbers/Integers.java index 222be7aa..7d10c733 100644 --- a/src/com/jwetherell/algorithms/numbers/Integers.java +++ b/src/com/jwetherell/algorithms/numbers/Integers.java @@ -6,7 +6,7 @@ public class Integers { - private static final int BILLION = 1000000000; //moved to the front for better readability (forgot to branch lol) + private static final int BILLION = 1000000000; //moved to the front for better readability (forgot to branch lol)(again) private static final int MILLION = 1000000; private static final int THOUSAND = 1000; private static final int HUNDRED = 100;