Sort members

This commit is contained in:
Gary Gregory 2022-08-26 14:43:02 -04:00
parent ad849fa8a3
commit 7d8701ebf4
1 changed files with 40 additions and 40 deletions

View File

@ -789,37 +789,6 @@ public class HashCodeBuilder implements Builder<Integer> {
return this;
}
/**
* Append a {@code hashCode} for an array.
*
* @param object
* the array to add to the {@code hashCode}
*/
private void appendArray(final Object object) {
// 'Switch' on type of array, to dispatch to the correct handler
// This handles multidimensional arrays
if (object instanceof long[]) {
append((long[]) object);
} else if (object instanceof int[]) {
append((int[]) object);
} else if (object instanceof short[]) {
append((short[]) object);
} else if (object instanceof char[]) {
append((char[]) object);
} else if (object instanceof byte[]) {
append((byte[]) object);
} else if (object instanceof double[]) {
append((double[]) object);
} else if (object instanceof float[]) {
append((float[]) object);
} else if (object instanceof boolean[]) {
append((boolean[]) object);
} else {
// Not an array of primitives
append((Object[]) object);
}
}
/**
* Append a {@code hashCode} for an {@link Object} array.
*
@ -868,6 +837,37 @@ public class HashCodeBuilder implements Builder<Integer> {
return this;
}
/**
* Append a {@code hashCode} for an array.
*
* @param object
* the array to add to the {@code hashCode}
*/
private void appendArray(final Object object) {
// 'Switch' on type of array, to dispatch to the correct handler
// This handles multidimensional arrays
if (object instanceof long[]) {
append((long[]) object);
} else if (object instanceof int[]) {
append((int[]) object);
} else if (object instanceof short[]) {
append((short[]) object);
} else if (object instanceof char[]) {
append((char[]) object);
} else if (object instanceof byte[]) {
append((byte[]) object);
} else if (object instanceof double[]) {
append((double[]) object);
} else if (object instanceof float[]) {
append((float[]) object);
} else if (object instanceof boolean[]) {
append((boolean[]) object);
} else {
// Not an array of primitives
append((Object[]) object);
}
}
/**
* Adds the result of super.hashCode() to this builder.
*
@ -881,15 +881,6 @@ public class HashCodeBuilder implements Builder<Integer> {
return this;
}
/**
* Returns the computed {@code hashCode}.
*
* @return {@code hashCode} based on the fields appended
*/
public int toHashCode() {
return iTotal;
}
/**
* Returns the computed {@code hashCode}.
*
@ -915,4 +906,13 @@ public class HashCodeBuilder implements Builder<Integer> {
return toHashCode();
}
/**
* Returns the computed {@code hashCode}.
*
* @return {@code hashCode} based on the fields appended
*/
public int toHashCode() {
return iTotal;
}
}