jvm.entity
Class GroupID

java.lang.Object
  |
  +--jvm.entity.GroupID

public final class GroupID
extends java.lang.Object
implements java.io.Serializable

A simple piece of information defining a certain group inside the medium. The group may be local (on the current server only) or global (composed of entities in all the servers)

Every GroupID has a associated ServerID defining the server it is running in.

Written: Radu Sion
Version: 0.12x
Source: GroupID.java

Visit Smart Software 

See Also:
ServerID, Serialized Form

Field Summary
 java.lang.String Name
          The group's name inside the medium.
 ServerID serverID
          The ServerID of this groups's server.
 
Constructor Summary
GroupID()
          Fake constructor.
GroupID(java.lang.String name)
          Creates a new GroupID object.
GroupID(java.lang.String name, ServerID server)
          Creates a new GroupID object.
 
Method Summary
 boolean equals(java.lang.Object obj)
          We're implementing this in order to use properly hash facilities.
 int hashCode()
          We're implementing this in order to use properly hash facilities.
 java.lang.String toString()
          We should NOT use here any chars used as delimiters inside the ServerID's string representation.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serverID

public A HREF="../../jvm/server/ServerID.html">ServerID serverID
The ServerID of this groups's server. If null then this group is defined global in the whole medium.

Name

public java.lang.String Name
The group's name inside the medium. Unique/group/serverid.
Constructor Detail

GroupID

public GroupID()
Fake constructor.

GroupID

public GroupID(java.lang.String name,
               ServerID server)
Creates a new GroupID object. No parameter checkings performed.

GroupID

public GroupID(java.lang.String name)
Creates a new GroupID object. Initializes the rest of the variables with null. No parameter checkings performed.
Method Detail

toString

public java.lang.String toString()
We should NOT use here any chars used as delimiters inside the ServerID's string representation. The string is trimmed upon return !!!
Overrides:
toString in class java.lang.Object
See Also:
ServerID.toString()

equals

public boolean equals(java.lang.Object obj)
We're implementing this in order to use properly hash facilities. In this implementation we assume that two GroupID objects are equal if they have the same string representation.
Overrides:
equals in class java.lang.Object
See Also:
hashCode(), ServerID

hashCode

public int hashCode()
We're implementing this in order to use properly hash facilities. In this implementation we just return the hashcode of the string representation of this object via toString().
Overrides:
hashCode in class java.lang.Object