com.hp.hpl.jena.util.iterator
Class SingletonIterator
java.lang.Object
com.hp.hpl.jena.util.iterator.NiceIterator
com.hp.hpl.jena.util.iterator.SingletonIterator
- All Implemented Interfaces:
- ClosableIterator, ExtendedIterator, Iterator
public class SingletonIterator
- extends NiceIterator
- implements ExtendedIterator
A ClosableIterator that contains only one element
- Version:
- $Revision: 1.6 $ on $Date: 2004/12/06 13:50:15 $
- Author:
- Dave Reynolds
Method Summary |
boolean |
hasNext()
Can return a single value |
Object |
next()
Return the value |
SingletonIterator
public SingletonIterator(Object element)
- Constructor
- Parameters:
element
- the single value to be returned
hasNext
public boolean hasNext()
- Can return a single value
- Specified by:
hasNext
in interface Iterator
- Overrides:
hasNext
in class NiceIterator
next
public Object next()
- Return the value
- Specified by:
next
in interface Iterator
- Overrides:
next
in class NiceIterator
Copyright © 2000, 2001, 2002, 2003, 2004 Hewlett-Packard Development Company, LP