|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.smartics.exceptions.code.NumberCodeInfo de.smartics.exceptions.code.TwoNumberCodeInfo
public class TwoNumberCodeInfo
This Code
implementation models the exception code as a number. It supports a component identifier as an arbitrary string and provides a facility to specify the number as a major and a minor number that will be displayed separately.
Field Summary |
---|
Fields inherited from class de.smartics.exceptions.code.NumberCodeInfo |
---|
componentId, majorNumber, minorNumber |
Constructor Summary | |
---|---|
TwoNumberCodeInfo(Integer majorNumber) Convenience constructor. |
|
TwoNumberCodeInfo(String componentId, Integer majorNumber) Convenience constructor. |
|
TwoNumberCodeInfo(String componentId, Integer majorNumber, Integer minorNumber) Default constructor. |
Method Summary | |
---|---|
String |
getCode() Returns the string representation of the code. |
String |
getDisplayId() Returns the string representation of the code. |
Methods inherited from class de.smartics.exceptions.code.NumberCodeInfo |
---|
getComponentId, getMajorNumber, getMinorNumber, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TwoNumberCodeInfo(Integer majorNumber)
majorNumber
- the major number of the code defines a group of codes.
public TwoNumberCodeInfo(String componentId, Integer majorNumber)
componentId
- the identifier of the component this code belongs to.
majorNumber
- the major number of the code defines a group of codes.
public TwoNumberCodeInfo(String componentId, Integer majorNumber, Integer minorNumber) throws NullPointerException
componentId
- the identifier of the component this code belongs to.
majorNumber
- the major number of the code defines a group of codes.
minorNumber
- the minor number gives additional information about the problem.
NullPointerException
- if the major number is
null
.
Method Detail |
---|
public String getCode()
Code
This is the code within the component and lacks the component identifier. If the component is interested in the code, this identifier is used.
getCode
in interface
Code
getCode
in class
NumberCodeInfo
public String getDisplayId()
Code
This returns the same value as Code.toString()
as this method can be used via property getter.
getDisplayId
in interface
Code
getDisplayId
in class
NumberCodeInfo
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |