messif.utility
Class ErrorCode

java.lang.Object
  extended by messif.utility.ErrorCode
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
BucketErrorCode, OperationErrorCode

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

See Also:
Serialized Form

Field Summary
static ErrorCode NOT_SET
          The initial value of an error code that was not set yet.
protected  java.lang.String text
          Holder of the current error code text
static ErrorCode UNKNOWN_ERROR
          Not specific error appeared.
 
Constructor Summary
protected ErrorCode(ErrorCode source)
          Creates a new instance of ErrorCode.
protected ErrorCode(java.lang.String text)
          Creates a new instance of ErrorCode.
 
Method Summary
 boolean equals(java.lang.Object object)
           
 int hashCode()
           
 boolean isSet()
          Returns true if the error code is not set yet (i.e.
 boolean isUnknownError()
          Returns true if the error code is unknown error (i.e.
 java.lang.String toString()
          Interface and global overrides
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NOT_SET

public static ErrorCode NOT_SET
The initial value of an error code that was not set yet.


UNKNOWN_ERROR

public static ErrorCode UNKNOWN_ERROR
Not specific error appeared. You may look at the source code which produced it to get some help.


text

protected final java.lang.String text
Holder of the current error code text

Constructor Detail

ErrorCode

protected ErrorCode(java.lang.String text)
Creates a new instance of ErrorCode. Use this constructor to create static members in classes to define new error codes.


ErrorCode

protected ErrorCode(ErrorCode source)
Creates a new instance of ErrorCode. Use this constructor to create static members as a copy of another constant. That is, the constants will be equal, but accessible by different names.

Method Detail

isSet

public boolean isSet()
Returns true if the error code is not set yet (i.e. has the value of NOT_SET)


isUnknownError

public boolean isUnknownError()
Returns true if the error code is unknown error (i.e. has the value of UNKNOWN_ERROR)


toString

public java.lang.String toString()
Interface and global overrides

Overrides:
toString in class java.lang.Object

hashCode

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

equals

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