GetHashCode() public method

public GetHashCode ( ) : int
return int
		public static void  CheckEqual(Query q1, Query q2)
		{
			Assert.AreEqual(q1.ToString(), q2.ToString());
			Assert.AreEqual(q1.GetHashCode(), q2.GetHashCode());
		}
		public static void  CheckUnequal(Query q1, Query q2)
		{
			Assert.IsTrue(q1.ToString() != q2.ToString());
			Assert.IsTrue(q2.ToString() != q1.ToString());
			
			// possible this test can fail on a hash collision... if that
			// happens, please change test to use a different example.
			Assert.IsTrue(q1.GetHashCode() != q2.GetHashCode());
		}
Beispiel #3
0
 public static void CheckEqual(Query q1, Query q2)
 {
     Assert.IsTrue(q1.Equals(q2));
     Assert.AreEqual(q1, q2);
     Assert.AreEqual(q1.GetHashCode(), q2.GetHashCode());
 }
Beispiel #4
0
        public static void CheckUnequal(Query q1, Query q2)
        {
            Assert.IsFalse(q1.Equals(q2), q1 + " equal to " + q2);
            Assert.IsFalse(q2.Equals(q1), q2 + " equal to " + q1);

            // possible this test can fail on a hash collision... if that
            // happens, please change test to use a different example.
            Assert.IsTrue(q1.GetHashCode() != q2.GetHashCode());
        }
 public override int GetHashCode()
 {
     return(query.GetHashCode() ^ unchecked ((int)0x923F64B9));
 }
Beispiel #6
0
 public static void CheckEqual(Query q1, Query q2)
 {
     Assert.IsTrue(q1.Equals(q2));
     Assert.AreEqual(q1, q2);
     Assert.AreEqual(q1.GetHashCode(), q2.GetHashCode());
 }
Beispiel #7
0
 /// <summary>Returns a hash code value for this object. </summary>
 public override int GetHashCode()
 {
     return(query.GetHashCode() ^ filter.GetHashCode() + System.Convert.ToInt32(Boost));
 }
 /// <summary>Returns a hash code value for this object. </summary>
 public override int GetHashCode()
 {
     return(query.GetHashCode() ^ filter.GetHashCode());
 }
Beispiel #9
0
 public override int GetHashCode()
 {
     return([email protected]());
 }
Beispiel #10
0
 public override int GetHashCode()
 {
     return(query.GetHashCode() ^ (unchecked ((int)0x923F64B9L)));                // {{Aroush-1.9}} Is this OK?!
 }
Beispiel #11
0
 /// <summary>Returns a hash code value for this object.</summary>
 public override int GetHashCode()
 {
     return(query.GetHashCode() ^ (Occur.MUST.Equals(occur)?1:0) ^ (Occur.MUST_NOT.Equals(occur)?2:0));
 }
Beispiel #12
0
 /// <summary>Returns a hash code value for this object.</summary>
 public override int GetHashCode()
 {
     return(query.GetHashCode() ^ (this.required?1:0) ^ (this.prohibited?2:0));
 }
Beispiel #13
0
 public override int GetHashCode()
 {
     return(Query_Renamed.GetHashCode() ^ unchecked ((int)0x923F64B9));
 }