|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.mcdermottroe.exemplar.ui.cli.ExitCode
public class ExitCode
A structure for keeping exit codes.
| Field Summary | |
|---|---|
private String |
description
A description of the exit code and what it's used for. |
private String |
mnemonic
The short name for the exit code. |
private int |
numericForm
The numeric form to be passed to System.exit(int). |
| Constructor Summary | |
|---|---|
ExitCode(int code,
String name,
String desc)
Simple constructor, just sets the members. |
|
| Method Summary | |
|---|---|
int |
compareTo(ExitCode other)
Implement Comparable.compareTo(Object). |
boolean |
equals(Object o)
Implement Object.equals(Object). |
ExitCode |
getCopy()
Creates a deep copy of the current object and returns it. |
String |
getDescription()
Getter for the description member. |
String |
getMnemonic()
Getter for the mnemonic member. |
int |
getNumericForm()
Getter for the numericForm member. |
int |
hashCode()
Implement Object.hashCode(). |
String |
toString()
Synonym for getMnemonic(). |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private final int numericForm
System.exit(int).
private final String mnemonic
private final String description
| Constructor Detail |
|---|
public ExitCode(int code,
String name,
String desc)
code - The value for numericForm.name - The value for mnemonic.desc - The value for description.| Method Detail |
|---|
public int compareTo(ExitCode other)
Comparable.compareTo(Object).
compareTo in interface Comparable<ExitCode>other - The ExitCode to compare with.
Comparable.compareTo(Object).public int getNumericForm()
numericForm member.
numericForm member.public String getMnemonic()
mnemonic member.
mnemonic member.public String getDescription()
description member.
description member.public String toString()
getMnemonic().
toString in class Objectmnemonic member.public boolean equals(Object o)
Object.equals(Object).
equals in class Objecto - The other object to compare this with.
this equals o.public int hashCode()
Object.hashCode().
hashCode in class Objectpublic ExitCode getCopy()
getCopy in interface Copyable<ExitCode>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||