com.sun.msv.verifier.identity.KeyValue Maven / Gradle / Ivy
package com.sun.msv.verifier.identity;
/*
* @(#)$Id: KeyValue.java,v 1.3 2003/06/09 20:37:42 kk122374 Exp $
*
* Copyright 2001 Sun Microsystems, Inc. All Rights Reserved.
*
* This software is the proprietary information of Sun Microsystems, Inc.
* Use is subject to license terms.
*
*/
import org.xml.sax.Locator;
import org.xml.sax.helpers.LocatorImpl;
/**
* represents multi-field keys.
*
* this class implements equality test and hash code based on
* the equalities of each item.
*
* @author Kohsuke KAWAGUCHI
*/
class KeyValue {
public final Object[] values;
/** source location that this value is found. */
public final Locator locator;
KeyValue( Object[] values, Locator loc ) {
this.values = values;
if(loc==null) this.locator = null;
else this.locator = new LocatorImpl(loc);
}
public int hashCode() {
int code = 0;
for( int i=0; i © 2015 - 2025 Weber Informatics LLC | Privacy Policy