com.cedarsoft.exceptions
Class ErrorCode

java.lang.Object
  extended by com.cedarsoft.exceptions.ErrorCode

public class ErrorCode
extends Object

Author:
Johannes Schneider (js@cedarsoft.com)

Nested Class Summary
static class ErrorCode.Prefix
          Represents a prefix for error codes.
 
Constructor Summary
ErrorCode(ErrorCode.Prefix prefix, int id)
          Creates a new error code
 
Method Summary
 boolean equals(Object o)
           
 String format()
          Returns the error code formatted as string
 int getId()
          Returns the id
 ErrorCode.Prefix getPrefix()
          Returns the prefix of the error code
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ErrorCode

public ErrorCode(@Nonnull
                 ErrorCode.Prefix prefix,
                 int id)
Creates a new error code

Parameters:
prefix - the prefix
id - the id
Method Detail

getPrefix

@Nonnull
public ErrorCode.Prefix getPrefix()
Returns the prefix of the error code

Returns:
the prefix of the error code

getId

public int getId()
Returns the id

Returns:
the id

format

@Nonnull
public String format()
Returns the error code formatted as string

Returns:
the error code as string

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2012 cedarsoft GmbH. All Rights Reserved.