Esempio n. 1
0
        public override int GetHashCode()
        {
            int prime  = 31;
            int result = base.GetHashCode();

            result = prime * result + ((term == null)?0:term.GetHashCode());
            return(result);
        }
Esempio n. 2
0
        //@Override
        public override int GetHashCode()
        {
            int prime  = 31;
            int result = base.GetHashCode();

            result = prime * result + ((prefix == null)?0:prefix.GetHashCode());
            return(result);
        }
Esempio n. 3
0
        public override int GetHashCode()
        {
            int prime  = 31;
            int result = base.GetHashCode();

            result = prime * result + BitConverter.ToInt32(BitConverter.GetBytes(minimumSimilarity), 0);
            result = prime * result + prefixLength;
            result = prime * result + ((term == null)?0:term.GetHashCode());
            return(result);
        }
Esempio n. 4
0
        private int ArraysHashCode(Term[] termArray)
        {
            if (termArray == null)
            {
                return(0);
            }

            int result = 1;

            for (int i = 0; i < termArray.Length; i++)
            {
                Term term = termArray[i];
                result = 31 * result + (term == null?0:term.GetHashCode());
            }

            return(result);
        }
Esempio n. 5
0
 /// <summary>Returns a hash code value for this object.</summary>
 public override int GetHashCode()
 {
     return(BitConverter.ToInt32(BitConverter.GetBytes(GetBoost()), 0) ^ term.GetHashCode());
 }