com.pcbsys.nirvana.client.nEventPropertiesIterator< T > Class Reference

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(); }. More...

Inherits Iterator< T >.

Public Member Functions

boolean hasNext ()
 Returns whether there are any more entries in the iterator. More...
 
next ()
 The next method will return the next element in the iterator The returned object will be an object that is converted to a expected format If the EntrySet iterator is used, you must use the nEventPropertiesHelper to access the key and value of the entry object. More...
 
Object 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 usable format. More...
 
void remove ()
 Removes from the underlying dictionary the last element returned by this 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< T >.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
T com.pcbsys.nirvana.client.nEventPropertiesIterator< T >.next ( )

The next method will return the next element in the iterator The returned object will be an object that is converted to a expected 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< T >.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 usable 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 conversion of any strings will be performed prior to returning the object. All other types will be maintained
Returns
the next element in the array
Deprecated:
Since
9.10
void com.pcbsys.nirvana.client.nEventPropertiesIterator< T >.remove ( )

Removes from the underlying dictionary the last element returned by this iterator.

This method can be called only once per call to next. The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method.

Exceptions
IllegalStateExceptionif the method has not yet been called, or the
remove
method has already been called after the last call to the method
Since
9.10