result += result * 37 + getParameterName().hashCode();
String statName = getStatisticalProcessTypeNameShort();
if (statName != null) result += result * 37 + statName.hashCode();
} else {
Grib2Pds pds2 = (Grib2Pds) pds;
int productTemplate = pds2.getProductDefinitionTemplate();
result += result * 37 + discipline;
result += result * 37 + getLevelType1();
result += result * 37 + pds2.getParameterCategory();
result += result * 37 + productTemplate;
String statName = getStatisticalProcessTypeNameShort();
if (statName != null) result += result * 37 + statName.hashCode();
result += result * 37 + getLevelType2(); // ??
result += result * 37 + pds2.getParameterNumber();
String useGenType = pds2.getUseGenProcessType();
if (useGenType != null) result += result * 37 + useGenType.hashCode();
if (pds2.isEnsembleDerived()) {
Grib2Pds.PdsEnsembleDerived pdsDerived = (Grib2Pds.PdsEnsembleDerived) pds2;
result += result * 37 + pdsDerived.getDerivedForecastType(); // derived type (table 4.7)
} else if (pds2.isEnsemble()) {
result += result * 37 + 1;
}
if (pds2.isProbability()) {
Grib2Pds.PdsProbability pdsProb = (Grib2Pds.PdsProbability) pds2;
String name = getProbabilityVariableNameSuffix(pdsProb.getProbabilityLowerLimit(), pdsProb.getProbabilityUpperLimit(), pdsProb.getProbabilityType());
result += result * 37 + name.hashCode();
}
}