1 |
|
//---PACKAGE DECLARATION--- |
2 |
< |
package uk.ac.ukc.iscream.client; |
2 |
> |
package uk.org.iscream.client; |
3 |
|
|
4 |
|
//---IMPORTS--- |
5 |
< |
import uk.ac.ukc.iscream.util.*; |
5 |
> |
import uk.org.iscream.util.*; |
6 |
|
|
7 |
|
/** |
8 |
|
* Alert Object |
60 |
|
} |
61 |
|
|
62 |
|
//---PUBLIC METHODS--- |
63 |
+ |
|
64 |
+ |
/** |
65 |
+ |
* Prints a String representation of the Alert object. It |
66 |
+ |
* is designed to resemble a HashMap.toString(), such that |
67 |
+ |
* it is similar to the XMLPacket.printAll() method. |
68 |
+ |
* |
69 |
+ |
* @return a String representation of this Alert object. |
70 |
+ |
*/ |
71 |
+ |
public String printAll() { |
72 |
+ |
String result = "{"; |
73 |
+ |
result += "alertLevel="+_alertLevel+", "; |
74 |
+ |
result += "lastAlert="+_lastAlert+", "; |
75 |
+ |
result += "thresholdLevel="+_thresholdLevel+", "; |
76 |
+ |
result += "source="+_source+", "; |
77 |
+ |
result += "thresholdValue="+_thresholdValue+", "; |
78 |
+ |
result += "value="+_value+", "; |
79 |
+ |
result += "attributeName="+_attributeName+", "; |
80 |
+ |
result += "timeTillNextAlert="+_timeTillNextAlert+", "; |
81 |
+ |
result += "initialAlertTime="+_initialAlertTime; |
82 |
+ |
result += "}"; |
83 |
+ |
return result; |
84 |
+ |
} |
85 |
|
|
86 |
|
/** |
87 |
|
* Overrides the {@link java.lang.Object#toString() Object.toString()} |
88 |
|
* method to provide clean logging (every class should have this). |
89 |
|
* |
90 |
< |
* This uses the uk.ac.ukc.iscream.util.FormatName class |
90 |
> |
* This uses the uk.org.iscream.util.FormatName class |
91 |
|
* to format the toString() |
92 |
|
* |
93 |
|
* @return the name of this class and its CVS revision |
138 |
|
return _timeTillNextAlert; |
139 |
|
} |
140 |
|
|
141 |
< |
public long getInitialAlertTime () { |
141 |
> |
public long getInitialAlertTime() { |
142 |
|
return _initialAlertTime; |
143 |
|
} |
144 |
|
|