@SuppressWarnings("unchecked") protected static int hashFields(int hash,Map<FieldDescriptor,Object> map){
  for (  Map.Entry<FieldDescriptor,Object> entry : map.entrySet()) {
    FieldDescriptor field=entry.getKey();
    Object value=entry.getValue();
    hash=(37 * hash) + field.getNumber();
    if (field.getType() != FieldDescriptor.Type.ENUM) {
      hash=(53 * hash) + value.hashCode();
    }
 else     if (field.isRepeated()) {
      List<? extends EnumLite> list=(List<? extends EnumLite>)value;
      hash=(53 * hash) + Internal.hashEnumList(list);
    }
 else {
      hash=(53 * hash) + Internal.hashEnum((EnumLite)value);
    }
  }
  return hash;
}

@ SuppressWarnings ( "unchecked" ) protected static int hashFields ( int hash , Map < FieldDescriptor , Object > map ) { for ( Map . Entry < FieldDescriptor , Object > entry : map . entrySet ( ) ) { FieldDescriptor field = entry . getKey ( ) ; Object value = entry . getValue ( ) ; hash = ( 37 * hash ) + field . getNumber ( ) ; if ( field . getType ( ) != FieldDescriptor . Type . ENUM ) { hash = ( 53 * hash ) + value . hashCode ( ) ; } else if ( field . isRepeated ( ) ) { List < ? extends EnumLite > list = ( List < ? extends EnumLite > ) value ; hash = ( 53 * hash ) + Internal . hashEnumList ( list ) ; } else { hash = ( 53 * hash ) + Internal . hashEnum ( ( EnumLite ) value ) ; } } return hash ; }
get a hash code for given fields and values , using the given seed .
