Beispiel #1
0
        public override bool AddAll(PrimitiveLongIterator values)
        {
            bool changed = false;

            while (values.HasNext())
            {
                changed |= HopScotchHashingAlgorithm.Put(Table, _monitor, DEFAULT_HASHING, values.Next(), _valueMarker, this) == null;
            }
            return(changed);
        }
Beispiel #2
0
 public override bool Remove(long value)
 {
     return(HopScotchHashingAlgorithm.Remove(Table, _monitor, DEFAULT_HASHING, value) == _valueMarker);
 }
Beispiel #3
0
 public Monitor_Adapter(HopScotchHashingAlgorithm outerInstance)
 {
     this._outerInstance = outerInstance;
 }
Beispiel #4
0
 public override bool Add(long value)
 {
     return(HopScotchHashingAlgorithm.Put(Table, _monitor, DEFAULT_HASHING, value, _valueMarker, this) == null);
 }
Beispiel #5
0
 public override bool ContainsKey(long key)
 {
     return(HopScotchHashingAlgorithm.Get(Table, _monitor, DEFAULT_HASHING, key) != null);
 }
Beispiel #6
0
 public override long Remove(long key)
 {
     return(Unpack(HopScotchHashingAlgorithm.Remove(Table, _monitor, DEFAULT_HASHING, key)));
 }
Beispiel #7
0
 public override long Get(int key)
 {
     return(Unpack(HopScotchHashingAlgorithm.Get(Table, _monitor, DEFAULT_HASHING, key)));
 }
Beispiel #8
0
 public override long Put(long key, long value)
 {
     return(Unpack(HopScotchHashingAlgorithm.Put(Table, _monitor, DEFAULT_HASHING, key, Pack(value), this)));
 }
Beispiel #9
0
 public override VALUE Remove(int key)
 {
     return(HopScotchHashingAlgorithm.Remove(Table, _monitor, DEFAULT_HASHING, key));
 }
Beispiel #10
0
 public override bool ContainsKey(int key)
 {
     return(HopScotchHashingAlgorithm.Get(Table, _monitor, DEFAULT_HASHING, key) != default(VALUE));
 }
Beispiel #11
0
 public override VALUE Put(int key, VALUE value)
 {
     return(HopScotchHashingAlgorithm.Put(Table, _monitor, DEFAULT_HASHING, key, value, this));
 }
Beispiel #12
0
 /// <summary>
 /// Prefer using <seealso cref="contains(int)"/> - this method is identical and required by the <seealso cref="IntPredicate"/> interface
 /// </summary>
 /// <param name="value"> the input argument </param>
 /// <returns> true if the input argument matches the predicate, otherwise false </returns>
 public override bool Test(int value)
 {
     return(HopScotchHashingAlgorithm.Get(Table, _monitor, DEFAULT_HASHING, value) == _valueMarker);
 }
Beispiel #13
0
 public override VALUE Get(long key)
 {
     return(HopScotchHashingAlgorithm.Get(Table, _monitor, DEFAULT_HASHING, key));
 }