(boolean[] array)
| 1216 | /// |
| 1217 | /// the hash code for `array`. |
| 1218 | public static int hashCode(boolean[] array) { |
| 1219 | if (array == null) { |
| 1220 | return 0; |
| 1221 | } |
| 1222 | int hashCode = 1; |
| 1223 | for (boolean element : array) { |
| 1224 | // 1231, 1237 are hash code values for boolean value |
| 1225 | hashCode = 31 * hashCode + (element ? 1231 : 1237); |
| 1226 | } |
| 1227 | return hashCode; |
| 1228 | } |
| 1229 | |
| 1230 | /// Returns a hash code based on the contents of the given array. For any two |
| 1231 | /// not-null `int` arrays `a` and `b`, if |
no test coverage detected