1. /*
  2. * @(#)StringPair.java 1.6 03/12/19
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package com.sun.corba.se.spi.orb ;
  8. public class StringPair {
  9. private String first ;
  10. private String second ;
  11. public boolean equals( Object obj )
  12. {
  13. if (this == obj)
  14. return true ;
  15. if (!(obj instanceof StringPair))
  16. return false ;
  17. StringPair other = (StringPair)obj ;
  18. return (first.equals( other.first ) &&
  19. second.equals( other.second )) ;
  20. }
  21. public int hashCode()
  22. {
  23. return first.hashCode() ^ second.hashCode() ;
  24. }
  25. public StringPair( String first, String second )
  26. {
  27. this.first = first ;
  28. this.second = second ;
  29. }
  30. public String getFirst()
  31. {
  32. return first ;
  33. }
  34. public String getSecond()
  35. {
  36. return second ;
  37. }
  38. }