Exemplo n.º 1
0
        public override void Copy(MutableValue source)
        {
            MutableValueDouble s = (MutableValueDouble)source;

            Value  = s.Value;
            Exists = s.Exists;
        }
Exemplo n.º 2
0
        public override MutableValue Duplicate()
        {
            MutableValueDouble v = new MutableValueDouble();

            v.Value  = this.Value;
            v.Exists = this.Exists;
            return(v);
        }
Exemplo n.º 3
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);
        }
Exemplo n.º 4
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);
        }
Exemplo n.º 5
0
        public override bool EqualsSameType(object other)
        {
            MutableValueDouble b = (MutableValueDouble)other;

            return(Value == b.Value && Exists == b.Exists);
        }