org.spicefactory.pimento.io
Class PropertyIterator

java.lang.Object
  extended by org.spicefactory.pimento.io.PropertyIterator

public class PropertyIterator
extends Object

An iterator over the property values of a single snapshot representation.

Author:
Jens Halm

Method Summary
 int currentIndex()
          Returns the current property index.
 ManagedProperty currentProperty()
          Returns the metamodel for the current property.
 Object currentValue()
          Returns the current property value.
 boolean next()
          Moves to the next property value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

next

public boolean next()
Moves to the next property value. If the iterator does not contain further property values this method returns false.

Returns:
true if this iterator has moved to the next position, false if it had reached its end

currentValue

public Object currentValue()
Returns the current property value.

Returns:
the current property value

currentIndex

public int currentIndex()
Returns the current property index. This is not the position of the iterator, it is the index position of the property value in the persistent snapshot.

Returns:
the current property index

currentProperty

public ManagedProperty currentProperty()
Returns the metamodel for the current property.

Returns:
the metamodel for the current property