// Equals is based on val and unit (NaN == NaN) public override bool hequals(object that) { if (!(that is HNum)) { return(false); } HNum x = (HNum)that; if (double.IsNaN(doubleval)) { return(double.IsNaN(x.doubleval)); } if (doubleval != x.doubleval) { return(false); } if (unit == null) { return(x.unit == null); } if (x.unit == null) { return(false); } return(unit.Equals(x.unit)); }
public static HaystackNumber Map(HNum value) { return(value.Source); }
// Convenience for <code>add(name, HNum.make(val, unit))</code> public HDictBuilder add(string name, double val, string unit) { return(add(name, HNum.make(val, unit))); }
// Convenience for <code>add(name, HNum.make(val, unit))</code> public HDictBuilder add(string name, long val, String unit) { return(add(name, HNum.make(val, unit))); }
////////////////////////////////////////////////////////////////////////// // Watches ////////////////////////////////////////////////////////////////////////// /** * Create a new watch with an empty subscriber list. The dis * string is a debug string to keep track of who created the watch. * Pass the desired lease time or null to use default. */ public abstract HWatch watchOpen(String dis, HNum lease);