@@ -122,8 +122,9 @@ private static <T> T[] newArray(final T key1, final T key2, final T key3, final
122122 /**
123123 * Constructor taking two keys.
124124 * <p>
125- * The keys should be immutable
125+ * The keys should be immutable.
126126 * If they are not then they must not be changed after adding to the MultiKey.
127+ * </p>
127128 *
128129 * @param key1 the first key
129130 * @param key2 the second key
@@ -137,6 +138,7 @@ public MultiKey(final K key1, final K key2) {
137138 * <p>
138139 * The keys should be immutable
139140 * If they are not then they must not be changed after adding to the MultiKey.
141+ * </p>
140142 *
141143 * @param key1 the first key
142144 * @param key2 the second key
@@ -149,8 +151,9 @@ public MultiKey(final K key1, final K key2, final K key3) {
149151 /**
150152 * Constructor taking four keys.
151153 * <p>
152- * The keys should be immutable
154+ * The keys should be immutable.
153155 * If they are not then they must not be changed after adding to the MultiKey.
156+ * </p>
154157 *
155158 * @param key1 the first key
156159 * @param key2 the second key
@@ -164,8 +167,9 @@ public MultiKey(final K key1, final K key2, final K key3, final K key4) {
164167 /**
165168 * Constructor taking five keys.
166169 * <p>
167- * The keys should be immutable
170+ * The keys should be immutable.
168171 * If they are not then they must not be changed after adding to the MultiKey.
172+ * </p>
169173 *
170174 * @param key1 the first key
171175 * @param key2 the second key
@@ -180,10 +184,12 @@ public MultiKey(final K key1, final K key2, final K key3, final K key4, final K
180184 /**
181185 * Constructor taking an array of keys which is cloned.
182186 * <p>
183- * The keys should be immutable
187+ * The keys should be immutable.
184188 * If they are not then they must not be changed after adding to the MultiKey.
189+ * </p>
185190 * <p>
186191 * This is equivalent to {@code new MultiKey(keys, true)}.
192+ * </p>
187193 *
188194 * @param keys the array of keys, not null
189195 * @throws NullPointerException if the key array is null
@@ -196,20 +202,23 @@ public MultiKey(final K[] keys) {
196202 * Constructor taking an array of keys, optionally choosing whether to clone.
197203 * <p>
198204 * <strong>If the array is not cloned, then it must not be modified.</strong>
205+ * </p>
199206 * <p>
200207 * This method is public for performance reasons only, to avoid a clone.
201208 * The hash code is calculated once here in this method.
202209 * Therefore, changing the array passed in would not change the hash code but
203210 * would change the equals method, which is a bug.
211+ * </p>
204212 * <p>
205213 * This is the only fully safe usage of this constructor, as the object array
206214 * is never made available in a variable:
207215 * <pre>
208216 * new MultiKey(new Object[] {...}, false);
209217 * </pre>
210218 * <p>
211- * The keys should be immutable
219+ * The keys should be immutable.
212220 * If they are not then they must not be changed after adding to the MultiKey.
221+ * </p>
213222 *
214223 * @param keys the array of keys, not null
215224 * @param makeClone true to clone the array, false to assign it
@@ -241,6 +250,7 @@ private void calculateHashCode(final Object[] keys) {
241250 * <p>
242251 * To be equal, the other object must be a {@code MultiKey} with the
243252 * same number of keys which are also equal.
253+ * </p>
244254 *
245255 * @param other the other object to compare to
246256 * @return true if equal
@@ -262,6 +272,7 @@ public boolean equals(final Object other) {
262272 * <p>
263273 * The key should be immutable.
264274 * If it is not then it must not be changed.
275+ * </p>
265276 *
266277 * @param index the index to retrieve
267278 * @return the key at the index
@@ -277,6 +288,7 @@ public K getKey(final int index) {
277288 * <p>
278289 * The keys should be immutable
279290 * If they are not then they must not be changed.
291+ * </p>
280292 *
281293 * @return the individual keys
282294 */
@@ -291,6 +303,7 @@ public K[] getKeys() {
291303 * change their hash codes once created (note that this is the same
292304 * constraint that would be used if the individual keys elements were
293305 * themselves {@link java.util.Map Map} keys).
306+ * </p>
294307 *
295308 * @return the hash code
296309 */
0 commit comments