public static int Compare(MessageNumber a, MessageNumber b)
    {
        int result = 0;

        if (a!=b)
        {
            if (((Object)a == null) && ((Object)b != null))
            {
                result = -1;
            }
            else if (((Object)a != null) && ((Object)b == null))
            {
                result = 1;                             
            }
            else
            {
                if (a.getProcessID() < b.getProcessID())
                {
                    result = -1;
                }
                else if (a.getProcessID() > b.getProcessID())
                {
                    result = 1;
                }
                else if (a.getSequenceNumber() < b.getSequenceNumber())
                {
                    result = -1;
                }
                else if (a.getSequenceNumber() > b.getSequenceNumber())
                {
                    result = 1;
                }
            }
        }
        return result;
    }