FileDocCategorySizeDatePackage
StringPair.javaAPI DocJava SE 5 API874Fri Aug 26 14:54:38 BST 2005com.sun.corba.se.spi.orb

StringPair.java

/*
 * @(#)StringPair.java	1.6 03/12/19
 *
 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
 * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */
package com.sun.corba.se.spi.orb ;

public class StringPair {
    private String first ;
    private String second ;

    public boolean equals( Object obj )
    {
	if (this == obj)
	    return true ;

	if (!(obj instanceof StringPair))
	    return false ;

	StringPair other = (StringPair)obj ;

	return (first.equals( other.first ) &&
	    second.equals( other.second )) ;
    }

    public int hashCode()
    {
	return first.hashCode() ^ second.hashCode() ;
    }

    public StringPair( String first, String second )
    {
	this.first = first ;
	this.second = second ;
    }

    public String getFirst()
    {
	return first ;
    }

    public String getSecond()
    {
	return second ;
    }
}