Example #1
0
        public override void Copy(MutableValue source)
        {
            MutableValueDouble s = (MutableValueDouble)source;

            Value  = s.Value;
            Exists = s.Exists;
        }
 public override MutableValue Duplicate()
 {
     MutableValueDouble v = new MutableValueDouble();
     v.Value = this.Value;
     v.Exists = this.Exists;
     return v;
 }
Example #3
0
        public override MutableValue Duplicate()
        {
            MutableValueDouble v = new MutableValueDouble();

            v.Value  = this.Value;
            v.Exists = this.Exists;
            return(v);
        }
Example #4
0
        public override bool EqualsSameType(object other)
        {
            MutableValueDouble b = (MutableValueDouble)other;

            // LUCENENET specific - compare bits rather than using equality operators to prevent these comparisons from failing in x86 in .NET Framework with optimizations enabled
            return(NumericUtils.DoubleToSortableInt64(Value) == NumericUtils.DoubleToSortableInt64(b.Value) &&
                   Exists == b.Exists);
        }
Example #5
0
        public override int CompareSameType(object other)
        {
            MutableValueDouble b = (MutableValueDouble)other;
            int c = Value.CompareTo(b.Value);

            if (c != 0)
            {
                return(c);
            }
            if (!Exists)
            {
                return(-1);
            }
            if (!b.Exists)
            {
                return(1);
            }
            return(0);
        }
Example #6
0
        public override bool EqualsSameType(object other)
        {
            MutableValueDouble b = (MutableValueDouble)other;

            return(Value == b.Value && Exists == b.Exists);
        }
Example #7
0
 public ValueFillerAnonymousInnerClassHelper(DoubleDocValuesAnonymousInnerClassHelper outerInstance)
 {
     this.outerInstance = outerInstance;
     mval = new MutableValueDouble();
 }