snifos.common
Class UserId

java.lang.Object
  extended bysnifos.common.UserId

public class UserId
extends java.lang.Object

This class represents id of a user in SNIFOS system.

Version:
$Id: UserId.java,v 1.2 2004/05/08 21:55:29 mwerla Exp $

Constructor Summary
UserId(int commModuleId, int userIdInModule)
          Creates new instance of UserId class.
 
Method Summary
 boolean equals(UserId that)
          Checks equality of two user ids.
 int getCommModuleId()
          Getter for commModuleId field.
 java.lang.String getUserId()
          Returns string representation of this UserId instance.
 int getUserIdInModule()
          Getter for userIdInModule field.
 int hashCode()
          Returns user id hashcode.
 java.lang.String toString()
          Returns string representation of this UserId instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UserId

public UserId(int commModuleId,
              int userIdInModule)
Creates new instance of UserId class.

Parameters:
commModuleId - Communication module to which user is connected.
userIdInModule - User id unique for the communication module to which user is connected.
Method Detail

equals

public boolean equals(UserId that)
Checks equality of two user ids.

Parameters:
that - UserId to compare.
Returns:
True if both ids represent the same user, otherwise false.
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Returns user id hashcode.

Returns:
Hash code of user id - baesd on its string representation.

toString

public java.lang.String toString()
Returns string representation of this UserId instance.

Returns:
commModuleId + "|" + userIdInModule

getCommModuleId

public int getCommModuleId()
Getter for commModuleId field.

Returns:
commModuleId
See Also:
UserId(int, int)

getUserId

public java.lang.String getUserId()
Returns string representation of this UserId instance.

Returns:
commModuleId + "|" + userIdInModule

getUserIdInModule

public int getUserIdInModule()
Getter for userIdInModule field.

Returns:
userIdInModule
See Also:
UserId(int, int)


Copyright © 2001-2004 MoMaT & MWe Team. All Rights Reserved.