public int CompareTo(ErlLink other) { int n = Node.CompareTo(other.Node); if (n != 0) { return(n); } return(Pid.CompareTo(other.Pid)); }
/// <summary> /// Compare this instance to the IErlObject. /// Negative value means that the value is less than obj, positive - greater than the obj /// </summary> public int CompareTo(IErlObject obj) { if (!(obj is ErlPid)) { return(TypeOrder < obj.TypeOrder ? -1 : 1); } var rhs = (ErlPid)obj; int n = Node.CompareTo(rhs.Node); if (n != 0) { return(n); } return(m_Num.CompareTo(rhs.m_Num)); }
/// <summary> /// Compare this instance to the IErlObject. /// Negative value means that the value is less than obj, positive - greater than the obj /// </summary> public int CompareTo(IErlObject obj) { if (!(obj is ErlPort)) { return(TypeOrder < obj.TypeOrder ? -1 : 1); } var rhs = (ErlPort)obj; int n = Node.CompareTo(rhs.Node); if (n != 0) { return(n); } n = Id.CompareTo(rhs.Id); if (n != 0) { return(n); } return(Creation.CompareTo(rhs.Creation)); }
/// <summary> /// Compare this instance to the IErlObject. /// Negative value means that the value is less than obj, positive - greater than the obj /// </summary> public int CompareTo(IErlObject obj) { if (!(obj is ErlRef)) { return(TypeOrder < obj.TypeOrder ? -1 : 1); } var rhs = (ErlRef)obj; int n = Node.CompareTo(rhs.Node); if (n != 0) { return(n); } for (int i = 0; i < Ids.Length; i++) { int m = Ids[i].CompareTo(rhs.Ids[i]); if (m != 0) { return(m); } } return(Creation.CompareTo(rhs.Creation)); }
public int CompareTo(ErlLink other) { var n = Node.CompareTo(other.Node); return(n != 0 ? n : Pid.CompareTo(other.Pid)); }