org.openjena.atlas.iterator
Class SingletonIterator<T>

java.lang.Object
  extended by org.openjena.atlas.iterator.SingletonIterator<T>
All Implemented Interfaces:
Iterable<T>, Iterator<T>

public class SingletonIterator<T>
extends Object
implements Iterator<T>, Iterable<T>


Constructor Summary
SingletonIterator(T thing)
           
 
Method Summary
static
<T> SingletonIterator<T>
create(T thing)
           
 boolean hasNext()
           
 Iterator<T> iterator()
           
 T next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingletonIterator

public SingletonIterator(T thing)
Method Detail

create

public static <T> SingletonIterator<T> create(T thing)

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator<T>

next

public T next()
Specified by:
next in interface Iterator<T>

remove

public void remove()
Specified by:
remove in interface Iterator<T>

iterator

public Iterator<T> iterator()
Specified by:
iterator in interface Iterable<T>


Licenced under the Apache License, Version 2.0