Here you can find the source of hashCode(Object[] thisFields)
Parameter | Description |
---|---|
thisFields | that used to count hash code. |
public static int hashCode(Object[] thisFields)
//package com.java2s; //License from project: Open Source License public class Main { /**// w w w .jav a 2 s.c om * Helper function to compute hasCode by fields. * * @param thisFields that used to count hash code. * @return hash code computed from thisFields elements. */ public static int hashCode(Object[] thisFields) { final int prime = 31; int result = 1; for (int i = 0; i < thisFields.length; i++) { Object field = thisFields[i]; if (field != null) { result = prime * result + field.hashCode(); } } return result; } }