org.mindswap.pellet
Class LiteralIterator

java.lang.Object
  extended by org.mindswap.pellet.LiteralIterator
All Implemented Interfaces:
java.util.Iterator<Literal>

public class LiteralIterator
extends java.lang.Object
implements java.util.Iterator<Literal>

An iterator to return nodes in the order they are added. Having a seperate iterator instead of using nodes.iterator() allows to change the nodes table without resetting the iteration process.

Author:
Evren Sirin

Constructor Summary
LiteralIterator(ABox abox)
          Create an iterator over all the individuals in the ABox
LiteralIterator(ABox abox, int start, int stop)
          Create a limited iterator over the individuals in the ABox that only covers the individuals whose index in nodeList is between start ans stop indices.
 
Method Summary
 int getIndex()
           
 boolean hasNext()
           
 void jump(int i)
           
 Literal next()
           
 void remove()
           
 void reset()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LiteralIterator

public LiteralIterator(ABox abox)
Create an iterator over all the individuals in the ABox


LiteralIterator

public LiteralIterator(ABox abox,
                       int start,
                       int stop)
Create a limited iterator over the individuals in the ABox that only covers the individuals whose index in nodeList is between start ans stop indices.

Parameters:
abox -
start -
stop -
Method Detail

getIndex

public int getIndex()

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator<Literal>

reset

public void reset()

jump

public void jump(int i)

next

public Literal next()
Specified by:
next in interface java.util.Iterator<Literal>

remove

public void remove()
Specified by:
remove in interface java.util.Iterator<Literal>


Copyright © 2004 Evren Sirin. All Rights Reserved.