public abstract class UjoIterator<T> extends Object implements Iterable<T>, Iterator<T>, Closeable
| Constructor and Description |
|---|
UjoIterator() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close all resources, if any.
|
long |
count()
Returns a count of items or value -1 if the count is not known.
|
static <T> UjoIterator<T> |
getInstance(Collection<T> collection)
Deprecated.
Use the method {@link #of(java.util.Collection) rather
|
static <T> UjoIterator<T> |
getInstance(Iterator<T> iterator)
Deprecated.
Use the method
of(java.util.Iterator) rather |
static <T extends OrmUjo> |
getInstance(Query<T> query)
Deprecated.
Use the method {@link #of(org.ujorm.orm.Query) rather
|
abstract boolean |
hasNext()
Tests if this enumeration contains more elements.
|
Iterator<T> |
iterator()
Returns the same instance
|
abstract T |
next()
Returns the next element if exists.
|
static <T> UjoIterator<T> |
of(Collection<T> collection)
Create an instance
|
static <T> UjoIterator<T> |
of(Iterator<T> iterator)
Create an instance
|
static <T extends OrmUjo> |
of(Query<T> query)
Create an instance
|
void |
remove()
Deprecated.
The method is not implemented.
|
boolean |
skip(int count)
Skip some items by the parameter.
|
List<T> |
toList()
Copy items to a new List
|
String |
toString()
Returns a count of items.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorforEachRemainingpublic abstract boolean hasNext()
public abstract T next() throws NoSuchElementException
next in interface Iterator<T>NoSuchElementException - no more elements exist.public long count()
public void remove()
public boolean skip(int count)
count - A count of item to skip.public List<T> toList() throws IllegalStateException
IllegalStateExceptionpublic void close()
close in interface Closeableclose in interface AutoCloseablepublic static final <T> UjoIterator<T> of(Iterator<T> iterator)
public static final <T> UjoIterator<T> of(Collection<T> collection)
public static final <T extends OrmUjo> UjoIterator<T> of(Query<T> query)
@Deprecated public static final <T> UjoIterator<T> getInstance(Iterator<T> iterator)
of(java.util.Iterator) rather@Deprecated public static final <T> UjoIterator<T> getInstance(Collection<T> collection)
@Deprecated public static final <T extends OrmUjo> UjoIterator<T> getInstance(Query<T> query)
Copyright 2013, Pavel Ponec