com.rshtech.exception
Class ErrorCode

java.lang.Object
  extended by com.rshtech.exception.ErrorCode
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ParameterizedErrorCode

public class ErrorCode
extends java.lang.Object
implements java.io.Serializable

An error code is a special object that represents a code or key for looking up an error code from a common source. This class primarily helps in creating constants, enumerations, and in allowing exception classes tell the difference between an error message and an error code in their constructors.

Version:
$Revision: 3137 $
Author:
$Author: kostya $
See Also:
Serialized Form

Field Summary
static ErrorCode UNKNOWN
           
 
Constructor Summary
ErrorCode(java.lang.String codeVal)
           
 
Method Summary
 boolean equals(ErrorCode rhs)
           
 boolean equals(java.lang.Object rhs)
           
 java.lang.String getCode()
           
 int hashCode()
           
protected  void setCode(java.lang.String code)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNKNOWN

public static final ErrorCode UNKNOWN
Constructor Detail

ErrorCode

public ErrorCode(java.lang.String codeVal)
Method Detail

getCode

public java.lang.String getCode()
Returns:
Returns the code.

equals

public boolean equals(java.lang.Object rhs)
Overrides:
equals in class java.lang.Object

equals

public boolean equals(ErrorCode rhs)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

setCode

protected void setCode(java.lang.String code)
Parameters:
code - The code to set.