Java Code Examples for com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarDescription#hashCode()

The following examples show how to use com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarDescription#hashCode() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SoftReferenceGrammarPool.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * 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();
}
 
Example 2
Source File: SoftReferenceGrammarPool.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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();
}
 
Example 3
Source File: SoftReferenceGrammarPool.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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();
}
 
Example 4
Source File: SoftReferenceGrammarPool.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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();
}
 
Example 5
Source File: SoftReferenceGrammarPool.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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();
}
 
Example 6
Source File: SoftReferenceGrammarPool.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * 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();
}
 
Example 7
Source File: SoftReferenceGrammarPool.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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();
}
 
Example 8
Source File: SoftReferenceGrammarPool.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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();
}
 
Example 9
Source File: SoftReferenceGrammarPool.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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();
}
 
Example 10
Source File: SoftReferenceGrammarPool.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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();
}
 
Example 11
Source File: SoftReferenceGrammarPool.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * 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();
}
 
Example 12
Source File: XMLGrammarPoolImpl.java    From openjdk-8-source with GNU General Public License v2.0 2 votes vote down vote up
/**
 * 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) {
    return desc.hashCode();
}
 
Example 13
Source File: XMLGrammarPoolImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * 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) {
    return desc.hashCode();
}
 
Example 14
Source File: XMLGrammarPoolImpl.java    From Bytecoder with Apache License 2.0 2 votes vote down vote up
/**
 * 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) {
    return desc.hashCode();
}
 
Example 15
Source File: XMLGrammarPoolImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 2 votes vote down vote up
/**
 * 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) {
    return desc.hashCode();
}
 
Example 16
Source File: XMLGrammarPoolImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 2 votes vote down vote up
/**
 * 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) {
    return desc.hashCode();
}
 
Example 17
Source File: XMLGrammarPoolImpl.java    From JDKSourceCode1.8 with MIT License 2 votes vote down vote up
/**
 * 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) {
    return desc.hashCode();
}
 
Example 18
Source File: XMLGrammarPoolImpl.java    From jdk8u60 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * 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) {
    return desc.hashCode();
}
 
Example 19
Source File: XMLGrammarPoolImpl.java    From openjdk-8 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * 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) {
    return desc.hashCode();
}
 
Example 20
Source File: XMLGrammarPoolImpl.java    From jdk1.8-source-analysis with Apache License 2.0 2 votes vote down vote up
/**
 * 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) {
    return desc.hashCode();
}