Returns the hash code of this list. The hash code is calculated by taking each element's hashcode into account. @return the hash code. @see #equals @see List#hashCode()
()
| 519 | * @see List#hashCode() |
| 520 | */ |
| 521 | @Override |
| 522 | public int hashCode() { |
| 523 | int result = 1; |
| 524 | Iterator<?> it = iterator(); |
| 525 | while (it.hasNext()) { |
| 526 | Object object = it.next(); |
| 527 | result = (31 * result) + (object == null ? 0 : object.hashCode()); |
| 528 | } |
| 529 | return result; |
| 530 | } |
| 531 | |
| 532 | /** |
| 533 | * Searches this list for the specified object and returns the index of the |