com.informatica.powercenter.sdk.mapfwk.core
Class ParameterFileIterator

java.lang.Object
  extended by com.informatica.powercenter.sdk.mapfwk.core.ParameterFileIterator
All Implemented Interfaces:
java.util.Iterator

public class ParameterFileIterator
extends java.lang.Object
implements java.util.Iterator

This is a custom iterator to iterate over the various parameters present in the ParameterFile.


Constructor Summary
ParameterFileIterator(java.util.HashMap propNames)
          The HahMap should contain the various containerNames as keys and vector of keyvalue pairs consisting of parameters as keys and their values as names.
 
Method Summary
 java.lang.String getParameterName()
          get the parameter name
 java.lang.String getScope()
          get the scope of the parameter
 java.lang.String getValue()
          get the value of the parameter
 boolean hasNext()
          returns true if there is another row that is available of the form: [scope].paramName=value where scope is scope of the parameter, paramName is the parameter name and value is the parameter value.
 java.lang.Object next()
          This assumes that a call to hasNext() has been made to ensure that a next element exists.
 void remove()
          Remove function is not supported by the ParameterFileIterator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParameterFileIterator

public ParameterFileIterator(java.util.HashMap propNames)
The HahMap should contain the various containerNames as keys and vector of keyvalue pairs consisting of parameters as keys and their values as names.

Parameters:
propNames - The
Method Detail

hasNext

public boolean hasNext()
returns true if there is another row that is available of the form: [scope].paramName=value where scope is scope of the parameter, paramName is the parameter name and value is the parameter value.

Specified by:
hasNext in interface java.util.Iterator
Returns:
boolean

next

public java.lang.Object next()
This assumes that a call to hasNext() has been made to ensure that a next element exists. This returns a vector containing the scope of the parameter, its name and its value. This also sets the scope, parameterName and parameterValue. This can be used in 2 ways. 1. while(iter.hasNext()) { Vector v = iter.next(); String scope = v.elementAt(0); String paramName = v.elementAt(1); String value = v.elementAt(2); ... } 2. The above is equivalent to while(iter.hasNext()) { iter.next(); String scope = iter.getScope(); String paramName = iter.getParameterName(); String value = iter.getValue(); ... }

Specified by:
next in interface java.util.Iterator
Returns:
Vector containing data in the following format 1. element 0 - scope 2. element 1 - parameter name 3. element 2 - value of the parameter

getScope

public java.lang.String getScope()
get the scope of the parameter

Returns:
the scope of the last parameter that was retrieved using a call to next()

getParameterName

public java.lang.String getParameterName()
get the parameter name

Returns:
the name of the last parameter that was retrieved using a call to next()

getValue

public java.lang.String getValue()
get the value of the parameter

Returns:
the value of the last parameter that was retrieved using a call to next()

remove

public void remove()
Remove function is not supported by the ParameterFileIterator

Specified by:
remove in interface java.util.Iterator
Throws:
java.lang.UnsupportedOperationException - This is unsupported and throws an UnsupportedOperationException