|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.metamatrix.api.core.message.MessageList.Statistics
public class MessageList.Statistics
Class that maintains statistics for the MessageList's Message instances categorized by various types. Instances of this class are automatically created by MessageList and dynamically reflect any changes to its MessageList.
Constructor Summary | |
---|---|
protected |
MessageList.Statistics()
No-arg constructor |
Method Summary | |
---|---|
protected void |
addMessage(Message msg)
Add a message to the statistics. |
protected void |
clear()
Clear the current statistics |
int |
getErrorCount()
Gets the number of Message instances that have a type of MessageTypes.ERROR_MESSAGE . |
int |
getNoneCount()
Gets the number of Message instances that have a type of MessageTypes.NULL_MESSAGE
(e.g., no type specified). |
int |
getNotificationCount()
Gets the number of Message instances that have a type of MessageTypes.NOTIFICATION_MESSAGE . |
int |
getOtherCount()
Gets the number of Message instances that have a type other than MessageTypes.ERROR_MESSAGE ,
MessageTypes.WARNING_MESSAGE ,
MessageTypes.NOTIFICATION_MESSAGE , or
MessageTypes.NULL_MESSAGE . |
int |
getTotalCount()
Gets the total number of Message instances in the backing MessageList instance. |
int |
getWarningCount()
Gets the number of Message instances that have a type of MessageTypes.WARNING_MESSAGE . |
protected void |
removeMessage(Message msg)
Remove a message from the statistics. |
java.lang.String |
toString()
Return the string representation of this object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected MessageList.Statistics()
Method Detail |
---|
protected void clear()
protected void addMessage(Message msg)
msg
- the Message to be added; if null, this method does nothingprotected void removeMessage(Message msg)
msg
- the Message to be removed; if null, this method does nothingpublic int getErrorCount()
MessageTypes.ERROR_MESSAGE
.
Note that this value may change as Message instances are added to and removed from this Statistic's backing MessageList.
public int getWarningCount()
MessageTypes.WARNING_MESSAGE
.
Note that this value may change as Message instances are added to and removed from this Statistic's backing MessageList.
public int getNotificationCount()
MessageTypes.NOTIFICATION_MESSAGE
.
Note that this value may change as Message instances are added to and removed from this Statistic's backing MessageList.
public int getNoneCount()
MessageTypes.NULL_MESSAGE
(e.g., no type specified).
Note that this value may change as Message instances are added to and removed from this Statistic's backing MessageList.
public int getOtherCount()
MessageTypes.ERROR_MESSAGE
,
MessageTypes.WARNING_MESSAGE
,
MessageTypes.NOTIFICATION_MESSAGE
, or
MessageTypes.NULL_MESSAGE
.
Note that this value may change as Message instances are added to and removed from this Statistic's backing MessageList.
public int getTotalCount()
MessageList.size()
.
Note that this value may change as Message instances are added to and removed from this Statistic's backing MessageList.
public java.lang.String toString()
[ne] errors, [nw] warnings, [nn] notifications, [nt] no-type, [no] others, [sum] total
where
[ne]
represents the number of messages that have an error type[nw]
represents the number of messages that have a warning type[nn]
represents the number of messages that have a notification type[nt]
represents the number of messages that have no type[no]
represents the number of messages that have other types[sum]
represents the number of messages
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |