1 21 22 package org.opensubsystems.core.util; 23 24 33 public class FourIntStruct extends ThreeIntStruct 34 { 35 37 40 protected int m_iFourth; 41 42 44 50 public FourIntStruct( 51 int iFirst, 52 int iSecond, 53 int iThird, 54 int iFourth 55 ) 56 { 57 super(iFirst, iSecond, iThird); 58 59 m_iFourth = iFourth; 60 } 61 62 64 67 public int getFourth() 68 { 69 return m_iFourth; 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 FourIntStruct) 87 { 88 FourIntStruct input = (FourIntStruct) oObject; 89 return (super.equals(oObject)) && (m_iFourth == input.m_iFourth); 90 } 91 } 92 return bRetval; 93 } 94 95 98 public int hashCode() 99 { 100 int iResult = HashCodeUtils.SEED; 101 iResult = HashCodeUtils.hash(iResult, m_iFourth); 102 iResult = HashCodeUtils.hash(iResult, super.hashCode()); 103 return iResult; 104 } 105 } 106 | Popular Tags |