public virtual int CompareTo(Quad o) { if (o == null) { return(1); } var rval = GetGraph().CompareTo(o.GetGraph()); if (rval != 0) { return(rval); } rval = GetSubject().CompareTo(o.GetSubject()); if (rval != 0) { return(rval); } rval = GetPredicate().CompareTo(o.GetPredicate()); if (rval != 0) { return(rval); } return(GetObject().CompareTo(o.GetObject())); }