示例#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);
        }
示例#2
0
 public override bool Remove(long value)
 {
     return(HopScotchHashingAlgorithm.Remove(Table, _monitor, DEFAULT_HASHING, value) == _valueMarker);
 }
示例#3
0
 public Monitor_Adapter(HopScotchHashingAlgorithm outerInstance)
 {
     this._outerInstance = outerInstance;
 }
示例#4
0
 public override bool Add(long value)
 {
     return(HopScotchHashingAlgorithm.Put(Table, _monitor, DEFAULT_HASHING, value, _valueMarker, this) == null);
 }
示例#5
0
 public override bool ContainsKey(long key)
 {
     return(HopScotchHashingAlgorithm.Get(Table, _monitor, DEFAULT_HASHING, key) != null);
 }
示例#6
0
 public override long Remove(long key)
 {
     return(Unpack(HopScotchHashingAlgorithm.Remove(Table, _monitor, DEFAULT_HASHING, key)));
 }
示例#7
0
 public override long Get(int key)
 {
     return(Unpack(HopScotchHashingAlgorithm.Get(Table, _monitor, DEFAULT_HASHING, key)));
 }
示例#8
0
 public override long Put(long key, long value)
 {
     return(Unpack(HopScotchHashingAlgorithm.Put(Table, _monitor, DEFAULT_HASHING, key, Pack(value), this)));
 }
示例#9
0
 public override VALUE Remove(int key)
 {
     return(HopScotchHashingAlgorithm.Remove(Table, _monitor, DEFAULT_HASHING, key));
 }
示例#10
0
 public override bool ContainsKey(int key)
 {
     return(HopScotchHashingAlgorithm.Get(Table, _monitor, DEFAULT_HASHING, key) != default(VALUE));
 }
示例#11
0
 public override VALUE Put(int key, VALUE value)
 {
     return(HopScotchHashingAlgorithm.Put(Table, _monitor, DEFAULT_HASHING, key, value, this));
 }
示例#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);
 }
示例#13
0
 public override VALUE Get(long key)
 {
     return(HopScotchHashingAlgorithm.Get(Table, _monitor, DEFAULT_HASHING, key));
 }