Skip to content
Snippets Groups Projects
Commit 128bdda7 authored by Goik Martin's avatar Goik Martin
Browse files

Cosmetics

parent 95a601ac
No related merge requests found
...@@ -73,11 +73,11 @@ ...@@ -73,11 +73,11 @@
<para>Apart from requiring the ugly <code language="java">return <para>Apart from requiring the ugly <code language="java">return
null</code> statement this approach is also ineffective due to null</code> statement this approach is also ineffective due to
possibly looping over all 12 zodiacs before finding the desired possibly looping over all 12 zodiacs before finding the desired
match. This being cumbersome a better approach creates a match. This being cumbersome we create a two-dimensional array
two-dimensional array <code>private static final Zodiac[][] <code>private static final Zodiac[][] zodiacByMonthByDay</code>
zodiacByMonthByDay</code> of zodiacs beforehand using of zodiacs beforehand using <code>month.ordinal()</code> as
<code>month.ordinal()</code> as first and <code>day</code> as first and <code>day</code> as second dimension index
second dimension index values:</para> values:</para>
<screen> 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 <screen> 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
JAN: 0 Cap Cap Cap Cap Cap Cap Cap Cap Cap Cap Cap Cap Cap Cap Cap Cap Cap Cap Cap Aqu Aqu Aqu Aqu Aqu Aqu Aqu Aqu Aqu Aqu Aqu Aqu JAN: 0 Cap Cap Cap Cap Cap Cap Cap Cap Cap Cap Cap Cap Cap Cap Cap Cap Cap Cap Cap Aqu Aqu Aqu Aqu Aqu Aqu Aqu Aqu Aqu Aqu Aqu Aqu
...@@ -116,7 +116,7 @@ static { ...@@ -116,7 +116,7 @@ static {
<para>static blocks get processed even before <para>static blocks get processed even before
<code>main(...)</code> is being started. This guarantees our <code>main(...)</code> is being started. This guarantees our
array being initialized before any access happens. Our array being initialized before any access happens. Our improved
<methodname>getZodiac(...)</methodname> implementation no longer <methodname>getZodiac(...)</methodname> implementation no longer
requires any loop or other quirks:</para> requires any loop or other quirks:</para>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment