Esempio n. 1
0
        public override void Copy(MutableValue source)
        {
            MutableValueSingle s = (MutableValueSingle)source;

            Value  = s.Value;
            Exists = s.Exists;
        }
Esempio n. 2
0
        public override MutableValue Duplicate()
        {
            MutableValueSingle v = new MutableValueSingle();

            v.Value  = this.Value;
            v.Exists = this.Exists;
            return(v);
        }
Esempio n. 3
0
        public override bool EqualsSameType(object other)
        {
            MutableValueSingle b = (MutableValueSingle)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.SingleToSortableInt32(Value) == NumericUtils.SingleToSortableInt32(b.Value) &&
                   Exists == b.Exists);
        }
Esempio n. 4
0
        public override int CompareSameType(object other)
        {
            MutableValueSingle b = (MutableValueSingle)other;
            int c = Value.CompareTo(b.Value);

            if (c != 0)
            {
                return(c);
            }
            if (Exists == b.Exists)
            {
                return(0);
            }
            return(Exists ? 1 : -1);
        }
Esempio n. 5
0
        public override bool EqualsSameType(object other)
        {
            MutableValueSingle b = (MutableValueSingle)other;

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