1 21 22 package org.opensubsystems.core.util; 23 24 33 public class ThreeIntStruct extends TwoIntStruct 34 { 35 37 40 protected int m_iThird; 41 42 44 51 public ThreeIntStruct( 52 int iFirst, 53 int iSecond, 54 int iThird 55 ) 56 { 57 super(iFirst, iSecond); 58 59 m_iThird = iThird; 60 } 61 62 64 67 public int getThird() 68 { 69 return m_iThird; 70 } 71 72 75 public boolean equals( 76 Object oObject 77 ) 78 { 79 boolean bRetval = false; 80 if (oObject == this) 81 { 82 return true; 83 } 84 else if (oObject != null) 85 { 86 if (oObject instanceof ThreeIntStruct) 87 { 88 ThreeIntStruct input = (ThreeIntStruct) oObject; 89 return (super.equals(oObject)) && (m_iThird == input.m_iThird); 90 } 91 } 92 return bRetval; 93 } 94 95 98 public int hashCode() 99 { 100 int iResult = HashCodeUtils.SEED; 101 iResult = HashCodeUtils.hash(iResult, m_iThird); 102 iResult = HashCodeUtils.hash(iResult, super.hashCode()); 103 return iResult; 104 } 105 106 } 107 | Popular Tags |