|
33 | 33 | <!-- TODO: AboutDataTypes... --> |
34 | 34 | <suite class="AboutObjects"> |
35 | 35 | <koan name="objectEqualsNull" |
36 | | - lesson="An Object instance should NEVER equal null keyword. This applies to all subclasses (everything exception primitives subclass Object)." /> |
| 36 | + lesson="An Object instance should NEVER equal null keyword. This applies to all subclasses (everything except primitives subclass Object)." /> |
37 | 37 | <koan name="objectEqualsSelf" |
38 | 38 | lesson="An Object instance should equal itself. This too applies to all subclasses of Object." /> |
39 | 39 | <koan name="objectIdentityEqualityIsTrueWhenReferringToSameObject" |
|
45 | 45 | <koan name="doubleEqualsOperatorEvalutesToFalseWithDifferentInstances" |
46 | 46 | lesson="The inverse of the prior koan, though two objects may be logically equal, they are not referencing the same object." /> |
47 | 47 | <koan name="objectToString" |
48 | | - lesson="How to identify an object at in string form. Should be overridden in any objects with internal state. Default to string is classname of the instance followed by its hashCode in base 16 (hexadecimal)." /> |
| 48 | + lesson="It's easy to identify an object's state at a glance - with a good toString() implementation. Should be overridden in any objects with internal state. Default to string is classname of the instance followed by its hashCode in base 16 (hexadecimal)." /> |
49 | 49 | <koan name="toStringConcatenates" |
50 | 50 | lesson="Java 's string concatenation syntax utilizes addition operator to splice a string with virtually anything." /> |
51 | 51 | <koan name="toStringIsTestedForNullWhenInvokedImplicitly" |
52 | 52 | lesson="String concatenation implicitly invokes toString on Objects, unless they are null. Notice no NullPointerException is thrown." /> |
53 | 53 | </suite> |
54 | | - <suite class="AboutLoops"> |
55 | | - <koan name="basicForLoop" /> |
56 | | - <koan name="basicForLoopWithTwoVariables" /> |
57 | | - <koan name="extendedForLoop" /> |
58 | | - <koan name="whileLoop" /> |
59 | | - <koan name="doLoop" /> |
60 | | - <koan name="extendedForLoopBreak" /> |
61 | | - <koan name="extendedForLoopContinue" /> |
62 | | - <koan name="forLoopContinueLabel" /> |
63 | | - <koan name="forLoopBreakLabel" /> |
64 | | - </suite> |
65 | | - <suite class="AboutCasting"> |
66 | | - <koan name="longPlusInt" /> |
67 | | - <koan name="forceIntTypecast" /> |
68 | | - <koan name="implicitTypecast" /> |
69 | | - <koan name="downCastWithInerhitance" /> |
70 | | - <koan name="downCastAndPolymophism" /> |
71 | | - <koan name="upCastWithInheritance" /> |
72 | | - <koan name="upCastAndPolymophism" /> |
73 | | - <koan name="complicatedCast" /> |
74 | | - <koan name="complicatedCastWithInterface" /> |
75 | | - </suite> |
76 | | - <suite class="AboutConditionals"> |
77 | | - <koan name="basicIfWithoutCurly" /> |
78 | | - <koan name="basicIfElseWithoutCurly" /> |
79 | | - <koan name="basicIfElseIfElseWithoutCurly" /> |
80 | | - <koan name="nestedIfsWithoutCurlysAreReallyMisleading" /> |
81 | | - <koan name="ifAsIntended" /> |
82 | | - <koan name="basicSwitchStatement" /> |
83 | | - <koan name="switchStatementFallThrough" /> |
84 | | - <koan name="switchStatementCrazyFallThrough" /> |
85 | | - <koan name="switchStatementConstants" /> |
86 | | - <koan name="switchStatementSwitchValues" /> |
87 | | - </suite> |
| 54 | + <suite class="AboutLoops" /> |
| 55 | + <suite class="AboutCasting"/> |
| 56 | + <suite class="AboutConditionals"/> |
88 | 57 | <suite class="AboutInheritance"> |
89 | | - <koan name="differenceBetweenOverloadingAndOverriding" /> |
90 | 58 | <koan name="overridenMethodsMayReturnSubtype" |
91 | 59 | lesson="An overridden method may return a subtype of the return type for the method being overridden. Look at the javadoc for java.util.Collection or java.util.List - it will reveal how to eliminate this type cast." /> |
92 | 60 | </suite> |
93 | | - <suite class="AboutConstructors"> |
94 | | - <koan name="simpleConstructorOrder" /> |
95 | | - <koan name="complexConstructorOrder" /> |
96 | | - </suite> |
97 | | - <suite class="AboutEnums"> |
98 | | - <koan name="basicEnums" /> |
99 | | - <koan name="basicEnumsAccess" /> |
100 | | - <koan name="enumsWithAttributes" /> |
101 | | - <koan name="enumsWithMethods" /> |
102 | | - </suite> |
103 | | - <suite class="AboutExceptions"> |
104 | | - <koan name="catchCheckedExceptions" /> |
105 | | - <koan name="useFinally" /> |
106 | | - <koan name="finallyWithoutCatch" /> |
107 | | - <koan name="catchUncheckedExceptions" /> |
108 | | - <koan name="catchOrder" /> |
109 | | - </suite> |
110 | | - <suite class="AboutMethodPreference"> |
111 | | - <koan name="methodPreferenceInt" /> |
112 | | - <koan name="methodPreferenceInteger" /> |
113 | | - <koan name="methodPreferenceLong" /> |
114 | | - <koan name="methodPreferenceBoxedLong" /> |
115 | | - <koan name="methodPreferenceDouble" /> |
116 | | - <koan name="methodPreferenceMore" /> |
117 | | - </suite> |
118 | | - <suite class="AboutOperators"> |
119 | | - <koan name="plusPlusVariablePlusPlus" /> |
120 | | - <koan name="shortCircuit" /> |
121 | | - <koan name="fullAnd" /> |
122 | | - <koan name="shortCircuitAnd" /> |
123 | | - <koan name="aboutXOR" /> |
124 | | - <koan name="dontMistakeEqualsForEqualsEquals" /> |
125 | | - <koan name="aboutBitShiftingRightShift" /> |
126 | | - <koan name="aboutBitShiftingLeftShift" /> |
127 | | - <koan name="aboutBitShiftingRightUnsigned" /> |
128 | | - </suite> |
| 61 | + <suite class="AboutConstructors"/> |
| 62 | + <suite class="AboutEnums"/> |
| 63 | + <suite class="AboutExceptions"/> |
| 64 | + <suite class="AboutMethodPreference"/> |
| 65 | + <suite class="AboutOperators"/> |
129 | 66 | <suite class="AboutArrays"> |
130 | 67 | <koan name="arraysDoNotConsiderElementsWhenEvaluatingEquality" |
131 | 68 | lesson="Arrays utilize reference equality, they do not consider elements when determining equality." /> |
132 | 69 | <koan name="cloneEqualityIs_NotRespected" |
133 | 70 | lesson="The general contract of clone is that: Object a == new Object(); a != a.clone(); a.equals(a.clone()). Array instances DO NOT honor this contract, despite implementing Cloneable." /> |
134 | 71 | <koan name="anArraysHashCodeMethodDoesNotConsiderElements" |
135 | 72 | lesson="Likewise with hashcode, an array instance's hashCode is that of the array, it does not incorporate elements." /> |
136 | | - <koan |
137 | | - name="arraysHelperClassEqualsMethodConsidersElementsWhenDeterminingEquality" |
| 73 | + <koan name="arraysHelperClassEqualsMethodConsidersElementsWhenDeterminingEquality" |
138 | 74 | lesson="The Arrays.equals(...) method DOES evaluate elements when determining equality. This is called 'Logical Equality'." /> |
139 | | - <koan |
140 | | - name="arraysHelperClassHashCodeMethodConsidersElementsWhenDeterminingHashCode" |
| 75 | + <koan name="arraysHelperClassHashCodeMethodConsidersElementsWhenDeterminingHashCode" |
141 | 76 | lesson="Likewise with hashCode, the Arrays.hashCode(...) method DOES consider elements when determining hashCode." /> |
142 | 77 | <koan name="arraysAreMutable" |
143 | 78 | lesson="Arrays are always mutable, even when declared final. The final declaration prevents reassignment, but does nothing for elements." /> |
|
148 | 83 | <koan name="arrayLengthCanBeChecked" |
149 | 84 | lesson="It is often necessary to check the length of an array to ensure an index is valid. This is easy with the array's length property." /> |
150 | 85 | </suite> |
151 | | - <suite class="AboutPrimitives"> |
152 | | - <koan name="byteSize" /> |
153 | | - <koan name="shortSize" /> |
154 | | - <koan name="integerSize" /> |
155 | | - <koan name="longSize" /> |
156 | | - <koan name="charSizeAndValue" /> |
157 | | - <koan name="floatSize" /> |
158 | | - <koan name="doubleSize" /> |
159 | | - </suite> |
| 86 | + <suite class="AboutPrimitives"/> |
160 | 87 | </package> |
161 | 88 | <package pkg="intermediate" name="Intermediate"> |
162 | 89 | <suite class="AboutAutoboxing"> |
|
167 | 94 | lesson="With AutoBoxing, we can intermix as well" /> |
168 | 95 | <koan name="allPrimativesCanBeAutoboxed" lesson="All primatives can be autoboxed" /> |
169 | 96 | </suite> |
170 | | - <suite class="AboutCollections"> |
171 | | - <koan name="usingAnArrayList" /> |
172 | | - <koan name="usingAQueue" /> |
173 | | - <koan name="usingABasicSet" /> |
174 | | - <koan name="usingABasicMap" /> |
175 | | - <koan name="usingBackedArrayList" /> |
176 | | - <koan name="usingBackedSubMap" /> |
177 | | - <koan name="differenceBetweenOrderedAndSorted" /> |
178 | | - </suite> |
179 | | - <suite class="AboutComparison"> |
180 | | - <koan name="compareObjects" /> |
181 | | - <koan name="makeObjectsComparable" /> |
182 | | - <koan name="makeObjectsComparableWithoutComparable" /> |
183 | | - </suite> |
184 | | - <suite class="AboutDates"> |
185 | | - <koan name="dateToString" /> |
186 | | - <koan name="changingDateValue" /> |
187 | | - <koan name="usingCalendarToChangeDates" /> |
188 | | - <koan name="usingRollToChangeDatesDoesntWrapOtherFields" /> |
189 | | - <koan name="usingDateFormatToFormatDate" /> |
190 | | - <koan name="usingDateFormatToFormatDateShort" /> |
191 | | - <koan name="usingDateFormatToFormatDateFull" /> |
192 | | - <koan name="usingDateFormatToParseDates" /> |
193 | | - </suite> |
194 | | - <suite class="AboutEquality"> |
195 | | - <koan name="sameObject" /> |
196 | | - <koan name="equalObject" /> |
197 | | - <koan name="noObjectShouldbeEqualToNull" /> |
198 | | - <koan name="equalForOwnObjects" /> |
199 | | - <koan name="unequalForOwnObjects" /> |
200 | | - <koan name="unequalForOwnObjectsWithDifferentType" /> |
201 | | - <koan name="equalNullForOwnObjects" /> |
202 | | - <koan name="ownHashCode" /> |
203 | | - <koan name="ownHashCodeImplementationPartTwo" /> |
204 | | - </suite> |
205 | | - <suite class="AboutFileIO"> |
206 | | - <koan name="fileObjectDoesntCreateFile" /> |
207 | | - <koan name="fileCreationAndDeletion" /> |
208 | | - <koan name="basicFileWritingAndReading" /> |
209 | | - <koan name="betterFileWritingAndReading" /> |
210 | | - <koan name="directChainingForReadingAndWriting" /> |
211 | | - </suite> |
212 | | - <suite class="AboutInnerClasses"> |
213 | | - <koan name="creatingInnerClassInstance" /> |
214 | | - <koan name="creatingInnerClassInstanceWithOtherSyntax" /> |
215 | | - <koan name="accessingOuterClassMembers" /> |
216 | | - <koan name="innerClassesInMethods" /> |
217 | | - <koan name="innerClassesInMethodsThatEscape" /> |
218 | | - <koan name="creatingAnonymousInnerClasses" /> |
219 | | - <koan name="creatingAnonymousInnerClassesToImplementInterface" /> |
220 | | - <koan name="innerClassAndInheritance" /> |
221 | | - <koan name="innerClassAndInheritanceOther" /> |
222 | | - <koan name="staticInnerClass" /> |
223 | | - <koan name="staticInnerClassFullyQualified" /> |
224 | | - </suite> |
225 | | - <suite class="AboutLocale"> |
226 | | - <koan name="localizedOutputOfDates" /> |
227 | | - <koan name="getCountryInformation" /> |
228 | | - <koan name="formatCurrency" /> |
229 | | - </suite> |
230 | | - <suite class="AboutRegularExpressions"> |
231 | | - <koan name="basicMatching" /> |
232 | | - <koan name="extendedMatching" /> |
233 | | - <koan name="escapingMetaCharacters" /> |
234 | | - <koan name="splittingStrings" /> |
235 | | - </suite> |
236 | | - <suite class="AboutSerialization"> |
237 | | - <koan name="simpleSerialization" /> |
238 | | - <koan name="customObjectSerialization" /> |
239 | | - <koan name="customObjectSerializationWithTransientFields" /> |
240 | | - <koan name="customSerializationWithUnserializableFields" /> |
241 | | - <koan name="serializeWithInteritance" /> |
242 | | - <koan name="serializeWithInheritanceWhenParentNotserializable" /> |
243 | | - </suite> |
| 97 | + <suite class="AboutCollections"/> |
| 98 | + <suite class="AboutComparison"/> |
| 99 | + <suite class="AboutDates"/> |
| 100 | + <suite class="AboutEquality"/> |
| 101 | + <suite class="AboutFileIO"/> |
| 102 | + <suite class="AboutInnerClasses"/> |
| 103 | + <suite class="AboutLocale"/> |
| 104 | + <suite class="AboutRegularExpressions"/> |
| 105 | + <suite class="AboutSerialization"/> |
244 | 106 | </package> |
245 | 107 | <package pkg="advanced" name="Advanced"> |
246 | 108 | <suite class="AboutMocks"> |
247 | | - <koan name="simpleAnonymousMock" |
248 | | - lesson="How can this pass without touching the ClassUnderTest?" /> |
| 109 | + <koan name="simpleAnonymousMock" lesson="How can this pass without touching the ClassUnderTest?" /> |
249 | 110 | </suite> |
250 | 111 | </package> |
251 | 112 | </packages> |
0 commit comments