Package spread
Class GroupID
- java.lang.Object
-
- spread.GroupID
-
public class GroupID extends java.lang.ObjectA 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 usingMembershipInfo.getGroupID(). To check if two GroupID's represent the same group, useequals(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 protectedGroupID(int id0, int id1, int id2)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(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()inthashCode()Returns the hash code of the group ID.java.lang.StringtoString()Converts the GroupID to a string.
-
-
-
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:
equalsin classjava.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:
hashCodein classjava.lang.Object- Returns:
- int the hash code
-
toString
public java.lang.String toString()
Converts the GroupID to a string.- Overrides:
toStringin classjava.lang.Object- Returns:
- the string form of this GroupID
-
-