public override void Copy(MutableValue source) { MutableValueSingle s = (MutableValueSingle)source; Value = s.Value; Exists = s.Exists; }
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); }
public override MutableValue Duplicate() { MutableValueSingle v = new MutableValueSingle(); v.Value = this.Value; v.Exists = this.Exists; return(v); }
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); }
public override bool EqualsSameType(object other) { MutableValueSingle b = (MutableValueSingle)other; return(Value == b.Value && Exists == b.Exists); }