Пример #1
0
 public StringMatchAutomatonStateDebugView(StringMatchAutomatonState owner)
 {
     Guard.IsNotNull(owner, nameof(owner));
     this.owner   = owner;
     this.hashMap = owner.HashMap;
 }
Пример #2
0
 public HashMapDebugView(HashMap <TKey, TValue> owner)
 {
     Guard.IsNotNull(owner, nameof(owner));
     this.owner = owner;
 }
Пример #3
0
 public StringMatchAutomatonState(int id)
 {
     this.id      = id;
     this.hashMap = new HashMap <char, StringMatchAutomatonState>();
 }
Пример #4
0
 public static int FindBucket <TKey, TValue>(this HashMap <TKey, TValue> @this, TKey key, int hashCode, Func <TKey, int, HashMap <TKey, TValue> .Bucket, bool> predicate)
 {
     return(@this.FindBucket(@this.Buckets, @this.Capacity, key, hashCode, predicate));
 }
Пример #5
0
 public static int FindUnusedBucket <TKey, TValue>(this HashMap <TKey, TValue> @this, HashMap <TKey, TValue> .Bucket[] buckets, int capacity, TKey key)
 {
     return(@this.FindBucket(buckets, capacity, key, @this.GetHashCode(key), (xKey, xHashCode, xBucket) => HashMap <TKey, TValue> .Bucket.IsUnused(xBucket)));
 }
Пример #6
0
        public static int FindBucket <TKey, TValue>(this HashMap <TKey, TValue> @this, TKey key)
        {
            int bIndex = @this.FindBucket(@this.Buckets, @this.Capacity, key, @this.GetHashCode(key), (xKey, xHashCode, xBucket) => HashMap <TKey, TValue> .Bucket.IsUnused(xBucket) || (HashMap <TKey, TValue> .Bucket.IsUsed(xBucket) && xHashCode == xBucket.HashCode && @this.AreKeysEqual(xKey, xBucket.Key)));

            return(HashMap <TKey, TValue> .Bucket.IsUsed(@this.Buckets[bIndex]) ? bIndex : -1);
        }
Пример #7
0
 public ValueEnumerator(HashMap <TKey, TValue> owner)
     : base(owner)
 {
 }
Пример #8
0
 public ValueCollection(HashMap <TKey, TValue> owner)
     : base(owner)
 {
 }
Пример #9
0
 public HashMapEnumeratorBase(HashMap <TKey, TValue> owner)
 {
     this.owner   = owner;
     this.version = owner.version;
     this.bucket  = -1;
 }
Пример #10
0
 public HashMapCollectionBase(HashMap <TKey, TValue> owner)
 {
     this.owner = owner;
 }