com.pcbsys.nirvana.client.nEventPropertiesIterator Class Reference

This class allows you to iterate through the nEventProperties to examine the key,value pairs. More...

Public Member Functions

boolean hasNext ()
 Returns whether there are any more entries in the iterator. More...
 
Object next ()
 The next method will return the next element in the iterator. More...
 
Object next (boolean convert)
 The next method will return the next element in the iterator. More...
 

Detailed Description

This class allows you to iterate through the nEventProperties to examine the key,value pairs.

The iterator will either be constructed from the EntrySet, the key set or the values set of the nEventProperties object

To use the entry set iterator call the getEntrySet() method on the nEventProperties object:

 for (nEventPropertiesIterator it = props.getEntrySet(); it.hasNext(); ) {
   Object next = it.next();
   Object key = nEventPropertiesHelper.getKey(next);
   Object value = nEventPropertiesHelper.getValue(next);
 }

To iterator through the nEventProperties using the KeySet iterator :

 for (nEventPropertiesIterator it = props.getKeyIterator(); it.hasNext(); ) {
   Object value = props.get(it.next());
 }

To iterator through the nEventProperties using the ValueSet iterator :

 for (nEventPropertiesIterator it = props.getValueIterator(); it.hasNext(); ) {
   Object value = it.next();
 }
See Also
nEventProperties
nEventPropertiesHelper
Since
4.0

Member Function Documentation

boolean com.pcbsys.nirvana.client.nEventPropertiesIterator.hasNext ( )

Returns whether there are any more entries in the iterator.

Returns
true if more entries to process, or false if iterator has no more entries
Object com.pcbsys.nirvana.client.nEventPropertiesIterator.next ( )

The next method will return the next element in the iterator.

The returned object will be an object that is converted to a usabled format.

If the EntrySet iterator is used, you must use the nEventPropertiesHelper to access the key and value of the entry object

Returns
the next element in the array
Object com.pcbsys.nirvana.client.nEventPropertiesIterator.next ( boolean  convert)

The next method will return the next element in the iterator.

The returned object will be an object that is converted to a usabled format.

If the EntrySet iterator is used, you must use the nEventPropertiesHelper to access the key and value of the entry object

Parameters
convertif false, and the value is a string, you will need to call toString on the object, if true, the ceonversion of any strings will be performed prior to returning the object. All other types will be maintained
Returns
the next element in the array