1:
31: package ;
32:
33: import ;
34:
35:
40: public class LibFormulaErrorValue implements ErrorValue
41: {
42: public static final int ERROR_REFERENCE_NOT_RESOLVABLE = 499;
43:
44:
45: public static final int ERROR_INVALID_CHARACTER = 501;
46:
47: public static final int ERROR_INVALID_FUNCTION = 505;
48:
49: public static final LibFormulaErrorValue ERROR_INVALID_FUNCTION_VALUE = new LibFormulaErrorValue(ERROR_INVALID_FUNCTION);
50:
51: public static final int ERROR_INVALID_ARGUMENT = 502;
52:
53: public static final LibFormulaErrorValue ERROR_INVALID_ARGUMENT_VALUE = new LibFormulaErrorValue(ERROR_INVALID_ARGUMENT);
54:
55: public static final int ERROR_INVALID_AUTO_ARGUMENT = 666;
56:
57: public static final LibFormulaErrorValue ERROR_INVALID_AUTO_ARGUMENT_VALUE = new LibFormulaErrorValue(ERROR_INVALID_AUTO_ARGUMENT);
58:
59: public static final int ERROR_ILLEGAL_ARRAY = 667;
60:
61: public static final LibFormulaErrorValue ERROR_ILLEGAL_ARRAY_VALUE = new LibFormulaErrorValue(ERROR_ILLEGAL_ARRAY);
62:
63: public static final int ERROR_ARITHMETIC = 503;
64:
65: public static final LibFormulaErrorValue ERROR_ARITHMETIC_VALUE = new LibFormulaErrorValue(ERROR_ARITHMETIC);
66:
67: public static final int ERROR_ARGUMENTS = 1;
68:
69: public static final LibFormulaErrorValue ERROR_ARGUMENTS_VALUE = new LibFormulaErrorValue(ERROR_ARGUMENTS);
70:
71: public static final int ERROR_NOT_FOUND = 504;
72:
73: public static final LibFormulaErrorValue ERROR_NOT_FOUND_VALUE = new LibFormulaErrorValue(ERROR_NOT_FOUND);
74:
75: public static final int ERROR_NA = 522;
76:
77: public static final LibFormulaErrorValue ERROR_NA_VALUE = new LibFormulaErrorValue(ERROR_NA);
78:
79: public static final int ERROR_UNEXPECTED = 0;
80:
81: public static final LibFormulaErrorValue ERROR_UNEXPECTED_VALUE = new LibFormulaErrorValue(ERROR_UNEXPECTED);
82:
83: private int errorCode;
84:
85: public LibFormulaErrorValue(final int errorCode)
86: {
87: this.errorCode = errorCode;
88: }
89:
90: public String getNamespace()
91: {
92: return "http://jfreereport.sourceforge.net/libformula";
93: }
94:
95: public int getErrorCode()
96: {
97: return errorCode;
98: }
99:
100: public String getErrorMessage(final Locale locale)
101: {
102: return "TODO";
103: }
104:
105: public boolean equals(final Object obj)
106: {
107: if(obj instanceof LibFormulaErrorValue)
108: {
109: final LibFormulaErrorValue error = (LibFormulaErrorValue)obj;
110: return this.errorCode == error.getErrorCode();
111: }
112:
113: return false;
114: }
115:
116: public String toString()
117: {
118: return "LibFormulaErrorValue{" +
119: "errorCode=" + errorCode +
120: '}';
121: }
122: }