|
"WEBNMS_5 API Docs" | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.adventnet.nms.severity.SeverityIterator
public class SeverityIterator
This is an iterator class which can be used to traverse the severity nodes which are having criticality. ie., This iterator will not include the severity values from the nodes which are having the attribute called NO_CRITICALITY with the value true.
Suppose if you want to traverse all the criticality leaf nodes from high criticality to low criticality, you need to get SeverityIterator and write the code as follows,
SeverityIterator iterator = SeverityInfo.getInstance().getIterator();
iterator points the first element with high criticality.
int severity = iterator.getNext(); // return highest criticality severity value
severity = iterator.getNext(); //return second highest severity value
severity = iterator.getNext(3); //return 3rd next severity from the current severity
and so on.
Suppose if you want to traverse all the criticality leaf nodes from clear to high criticality, you need to write the code as follows,
SeverityIterator iterator = SeverityInfo.getInstance().getIterator();
Now the iterator points to first element with high criticality.
iterator.moveToClear();// move to clear node.
int severity = iterator.getCurrent(); // return clear severity value
severity = iterator.getPrevious(); //return second severity value from Clear
severity = iterator.getPrevious(3); //return 3rd previous severity from the current severity.
and so on.
The above methods getNext(), getNext(int), getPrevious(), getPrevious(int) will throw java.util.NoSuchElementElementException if there is no next or previous element is avaliable.
SeverityInfo| Method Summary | |
|---|---|
int |
getCurrent()
This method can be used to get the current severity value. |
SeverityNode |
getCurrentNode()
This method can be used to get the SeverityNode of current severity. |
int |
getDirection()
This method will be used for future release. |
int |
getNext()
This method can be used to get the next severity value from current severity. |
int |
getNext(int nth)
This method can be used to get the next n'th severity value from current severity. |
int |
getNextCriticality()
This method can be used to get next higher criticality than the current criticality. |
int |
getNextCriticality(int nth)
This method can be used to get next n'th higher criticality than the current criticality. |
SeverityNode |
getNextNode()
This method can be used to get the SeverityNode of next severity. |
SeverityNode |
getNextNode(int nth)
This method can be used to get the SeverityNode of next n'th severity. |
int |
getPrevious()
This method can be used to get the previous severity value from current severity. |
int |
getPrevious(int nth)
This method can be used to get the previous n'th severity value from current severity. |
int |
getPreviousCriticality()
This method can be used to get next lower criticality than the current criticality. |
int |
getPreviousCriticality(int nth)
This method can be used to get next lower n'th criticality than the current criticality. |
SeverityNode |
getPreviousNode()
This method can be used to get the SeverityNode of previous severity. |
SeverityNode |
getPreviousNode(int nth)
This method can be used to get the SeverityNode of previous n'th severity. |
boolean |
moveToClear()
This method moves the pointer to the clear severity. |
boolean |
moveToHighest()
This method moves the pointer to maximum criticality severity node. |
boolean |
moveToHighest(int direction)
This method moves the pointer to point the maximum criticality in the given direction. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public boolean moveToHighest()
moveToHighest(int direction)public boolean moveToHighest(int direction)
moveToHighest()public boolean moveToClear()
public int getNext()
java.util.NoSuchElementException - if there is no next element.public int getNext(int nth)
integer - the nth value to get the next n'th severity.
java.util.NoSuchElementException - if there is no next n'th element.public int getPrevious()
java.util.NoSuchElementException - if there is no previous element.public int getPrevious(int nth)
integer - the nth value to get the previous n'th severity.
java.util.NoSuchElementException - if there is no previous n'th element.public int getCurrent()
public int getNextCriticality()
public int getNextCriticality(int nth)
integer - the nth value to get the n'th higher criticality.
public int getPreviousCriticality()
public int getPreviousCriticality(int nth)
integer - the nth value to get the n'th lower criticality.
public SeverityNode getNextNode()
SeverityNodepublic SeverityNode getNextNode(int nth)
SeverityNodepublic SeverityNode getPreviousNode()
SeverityNodepublic SeverityNode getPreviousNode(int nth)
SeverityNodepublic SeverityNode getCurrentNode()
SeverityNodepublic int getDirection()
direction.
|
"WEBNMS_5 API Docs" | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||