hash() private méthode

private hash ( object o ) : int
o object
Résultat int
Exemple #1
0
        public override int GetHashCode()
        {
            int result = Util.hash(_tag);

            result = 31 * result + Util.hash(_form);
            return(result);
        }
Exemple #2
0
        public override int GetHashCode()
        {
            ISeq s = seq();

            if (s == null)
            {
                return(1);
            }
            return(Util.hash(s));
        }
Exemple #3
0
 /// <summary>
 /// Get the hash code for the current object.
 /// </summary>
 /// <returns>The hash code.</returns>
 /// <remarks>Result is cached.</remarks>
 public override int GetHashCode()
 {
     if (_hash == -1)
     {
         int hash = 0;
         for (ISeq s = seq(); s != null; s = s.next())
         {
             hash = Util.hashCombine(hash, Util.hash(s.first()));
         }
         _hash = hash;
     }
     return(_hash);
 }
 /// <summary>
 /// Computes a hash code for the current object.
 /// </summary>
 /// <returns>A hash code for the current object.</returns>
 /// <remarks>The hash code is value-based (based on the items in the set).
 /// Once computed, the value is cached.</remarks>
 public override int GetHashCode()
 {
     if (_hash == -1)
     {
         int hash = 0;
         for (ISeq s = seq(); s != null; s = s.next())
         {
             object e = s.first();
             hash += Util.hash(e);
         }
         _hash = hash;
     }
     return(_hash);
 }
Exemple #5
0
 IFn FindFnFor(Type t)
 {
     if (_map != null)
     {
         Entry e = (Entry)_map[t];
         _mre = e;
         return(e != null ? e.Fn : null);
     }
     else
     {
         int idx = ((Util.hash(t) >> _shift) & _mask) << 1;
         if (idx < _table.Length && ((Type)_table[idx]) == t)
         {
             Entry e = ((Entry)table[idx + 1]);
             _mre = e;
             return(e != null ? e.Fn : null);
         }
         return(null);
     }
 }
Exemple #6
0
 /// <summary>
 /// Get the hash code.
 /// </summary>
 /// <returns>The hash code.</returns>
 public override int GetHashCode()
 {
     return(Util.hashCombine(_name.GetHashCode(), Util.hash(_ns)));
 }
Exemple #7
0
 /// <summary>
 /// Compute the hash code for the symbol.
 /// </summary>
 /// <returns>The hash code.</returns>
 private int ComputeHashCode()
 {
     return(Util.hashCombine(_name.GetHashCode(), Util.hash(_ns)));
 }
Exemple #8
0
 public override int GetHashCode()
 {
     return(Util.hash(seq()));
 }