Package org.goplanit.data
Class MultiKeyPlanItDataIteratorImpl
- java.lang.Object
-
- org.goplanit.data.MultiKeyPlanItDataIteratorImpl
-
- All Implemented Interfaces:
Iterator<Object[]>
,MultiKeyPlanItDataIterator
public class MultiKeyPlanItDataIteratorImpl extends Object implements MultiKeyPlanItDataIterator
Implementation of the MultiKeyPlanItDataIterator interface- Author:
- gman6028
-
-
Constructor Summary
Constructors Constructor Description MultiKeyPlanItDataIteratorImpl(boolean isSingleKey, org.apache.commons.collections4.IterableMap<Object,Object[]> singleKeyMap, org.apache.commons.collections4.map.MultiKeyMap<Object,Object[]> multiKeyMap)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object[]
getKeys()
Returns an array of keys for the current iterationObject[]
getValues()
Returns an array of values for the current iterationboolean
hasNext()
Returns whether the MultiKeyPlanItData has any more rowsObject[]
next()
Advances the iteration and returns the next array of keys in the iteration-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
-
-
-
Constructor Detail
-
MultiKeyPlanItDataIteratorImpl
public MultiKeyPlanItDataIteratorImpl(boolean isSingleKey, org.apache.commons.collections4.IterableMap<Object,Object[]> singleKeyMap, org.apache.commons.collections4.map.MultiKeyMap<Object,Object[]> multiKeyMap)
Constructor- Parameters:
isSingleKey
- flag to indicate whether the MultiKeyPlanItData object has one key or severalsingleKeyMap
- Map used if the MultiKeyPlanItData object has one keymultiKeyMap
- Map used if the MultiKeyPlanItData object has several keys
-
-
Method Detail
-
hasNext
public boolean hasNext()
Returns whether the MultiKeyPlanItData has any more rows- Specified by:
hasNext
in interfaceIterator<Object[]>
- Specified by:
hasNext
in interfaceMultiKeyPlanItDataIterator
- Returns:
- true if the MultiKeyPlanItData has any rows, false otherwise
-
next
public Object[] next()
Advances the iteration and returns the next array of keys in the iteration- Specified by:
next
in interfaceIterator<Object[]>
- Specified by:
next
in interfaceMultiKeyPlanItDataIterator
- Returns:
- the next array of keys in the iteration
-
getKeys
public Object[] getKeys()
Returns an array of keys for the current iteration- Specified by:
getKeys
in interfaceMultiKeyPlanItDataIterator
- Returns:
- array of keys for the current iteration
-
getValues
public Object[] getValues()
Returns an array of values for the current iteration- Specified by:
getValues
in interfaceMultiKeyPlanItDataIterator
- Returns:
- array of values for the current iteration
-
-