public abstract class AbstractParameterDefinitionIterator extends Object implements Iterator
Collection of ParameterDefinition objects based on whether the parameters are
required or not.
Note that a snapshot of the parameter definitions is taken at the time this iterator is created - concurrent access is allowed on the original set of parameter definitions, however, changes made to the original collection are not reflected by this iterator.
| Constructor and Description |
|---|
AbstractParameterDefinitionIterator(Collection<ParameterDefinition> parameterDefinitions,
boolean required)
Constructor for
AbstractParameterDefinitionIterator given the collection of parameter definitions. |
AbstractParameterDefinitionIterator(ParameterDefinition[] parameterDefinitions,
boolean required)
A convienence constructor that allows you to create a new
AbstractParameterDefinitionIterator object
given an array of parameter definitions, as opposed to a Collection. |
public AbstractParameterDefinitionIterator(Collection<ParameterDefinition> parameterDefinitions, boolean required)
AbstractParameterDefinitionIterator given the collection of parameter definitions. If
required is true, only those parameters defined as
required will be iterated. If required is
false, only those parameters defined as notrequired (i.e.
optional) will be iterated.
If parameterDefinitions is null, the iterator will be valid but will not have a
"next" element.
parameterDefinitions - the collection of parameters that are to be iterated (may be null)required - if true, only the definitions of required parameters are iterated; if
false, only the definitions of optional parameters are iteratedpublic AbstractParameterDefinitionIterator(ParameterDefinition[] parameterDefinitions, boolean required)
AbstractParameterDefinitionIterator object
given an array of parameter definitions, as opposed to a Collection. This is useful since the method
Command.getParameterDefinitions() returns an array.parameterDefinitions - array of definitionsrequired - if true, only the definitions of required parameters are iterated; if
false, only the definitions of optional parameters are iteratedAbstractParameterDefinitionIterator(Collection, boolean)public void remove()
throws UnsupportedOperationException
java.lang.UnsupportedOperationException - this method is not supported.remove in interface IteratorUnsupportedOperationExceptionIterator.remove()public boolean hasNext()
hasNext in interface IteratorIterator.hasNext()public Object next()
next in interface IteratorIterator.next()Copyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.