/* Copyright (C) 2009  CSE,IIT Bombay  http://www.cse.iitb.ac.in

This file is part of the ConStore open source storage facility for concept-nets.

ConStore is free software and distributed under the 
Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Unported License;
you can copy, distribute and transmit the work
with the work attribution in the manner specified by the author or licensor.
You may not use this work for commercial purposes and may not alter, 
transform, or build upon this work.

Please refer the legal code of the license, available at
http://creativecommons.org/licenses/by-nc-nd/3.0/legalcode

ConStore is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  */

package iitb.con.query;

/**
 * An ItemSet is a representation for a set of items returned by query.<br><br>
 * ItemSet interface allows to iterate the items within it.
 *  
 * @author Prathab K
 * @version 1.0
 */
public interface ItemSet<T> {
    
    /**
     * Returns the size of the <code>ItemSet</code> 
     * (number of items in the set). 
     * @return number of items
     */
    public int size();
    
    /**
     * Returns <code>true</code> if the <code>ItemSet</code>
     * has more elements.
     * @return boolean - <code>true</code> if the <code>ItemSet</code>
     * has more elements
     */
    public boolean hasNext();
    
    /**
     * Returns the next item from <code>ItemSet</code>.
     * @return the next item in the <code>ItemSet</code>
     */
    public T next();
    
    /**
     * Resets the <code>ItemSet</code> cursor to the first item.
     */
    public void reset();

}