Package spread

Class GroupID


  • public class GroupID
    extends java.lang.Object
    A GroupID represents a particular group membership view at a particular time in the history of the group. A GroupID can be retrieved from a membership message using MembershipInfo.getGroupID(). To check if two GroupID's represent the same group, use equals(Object):

     if(thisID.equals(thatID) == true)
         System.out.println("Equal group ID's.");
     

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int[] ID  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected GroupID​(int id0, int id1, int id2)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object object)
      Returns true if the two GroupID's represent the same group membership view at the same point in time in the history of the group.
      protected int[] getID()  
      int hashCode()
      Returns the hash code of the group ID.
      java.lang.String toString()
      Converts the GroupID to a string.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • ID

        private int[] ID
    • Constructor Detail

      • GroupID

        protected GroupID​(int id0,
                          int id1,
                          int id2)
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object object)
        Returns true if the two GroupID's represent the same group membership view at the same point in time in the history of the group.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        object - a GroupID to compare against
        Returns:
        true if object is a GroupID object and the two GroupID's are the same
      • getID

        protected int[] getID()
      • hashCode

        public int hashCode()
        Returns the hash code of the group ID.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        int the hash code
      • toString

        public java.lang.String toString()
        Converts the GroupID to a string.
        Overrides:
        toString in class java.lang.Object
        Returns:
        the string form of this GroupID