-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExeptions.java
More file actions
43 lines (35 loc) · 786 Bytes
/
Exeptions.java
File metadata and controls
43 lines (35 loc) · 786 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package com.example.arithmetic;
/**
* User: Nixy
* Date: 29.03.13
* Time: 11:33
*/
public class Exeptions {
static Exeptions uniqExeptions;
boolean flag = false;
String text ;
Exeptions(){};
public static final int OUT_OF_RANGE = 0;
public String getText() {
return text;
}
public boolean isFlag() {
return flag;
}
public void clear(){
flag = false;
}
public static Exeptions getInstance(){
if (uniqExeptions == null)
uniqExeptions = new Exeptions();
return uniqExeptions;
}
public void e(int code){
switch (code){
case OUT_OF_RANGE:
flag = true;
text = "OUT OF RANGE";
break;
}
}
}