I am sure many of us have not used this class.
Its very useful if you have an MboSet. It makes the code very clean and you dont have to do a loop till mboset.count()…..the normal way we access Mbo’s within an MboSet.
public class MboSetEnumeration
- extends java.lang.Object
This class steps through a MboSet using the Enumeration interface. It starts at position 0 of the MboSet and steps through until the end.
It has just one constructor:
And, has the usual methods like:
boolean hasMoreElements() Returns true if there is more elements in this enumeration.java.lang.Object nextElement() Returns the next element in the enumeration.
MboRemote nextMbo() A convience method for use in Mbo code, does the same thing as nextElement but returns the element as a MboRemote.
Method nextMbo() is most useful of this lot as I am sure getting an MBO instead of an Object will save some time in terms of casting 🙂