public class SampleErrorModel
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
message |
private int |
year |
Constructor and Description |
---|
SampleErrorModel(java.lang.String message,
int year)
Default Constructor for SampleErrorModel.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getMessage()
Gets the message associated with the error.
|
int |
getYear()
Gets the year of the error.
|
java.lang.String |
toString()
Generates a specially formatted string containing all the details about an error.
|
public SampleErrorModel(java.lang.String message, int year)
message
- year
- public int getYear()
public java.lang.String getMessage()
public java.lang.String toString()
toString
in class java.lang.Object