/** * Returns the hash code value for the given grammar description. * * @param desc The grammar description * @return The hash code value */ public int hashCode(XMLGrammarDescription desc) { if (desc instanceof XMLSchemaDescription) { final XMLSchemaDescription sd = (XMLSchemaDescription) desc; final String targetNamespace = sd.getTargetNamespace(); final String expandedSystemId = sd.getExpandedSystemId(); int hash = (targetNamespace != null) ? targetNamespace.hashCode() : 0; hash ^= (expandedSystemId != null) ? expandedSystemId.hashCode() : 0; return hash; } return desc.hashCode(); }
final String expandedSystemId = sd1.getExpandedSystemId(); if (expandedSystemId != null) { if (!expandedSystemId.equals(sd2.getExpandedSystemId())) { return false; else if (sd2.getExpandedSystemId() != null) { return false;