EclipseLink 2.5.0, build 'v20120919-fd7dc27' API Reference

org.eclipse.persistence.jpa.jpql.util.iterable
Class EmptyListIterable<E>

java.lang.Object
  extended by org.eclipse.persistence.jpa.jpql.util.iterable.EmptyListIterable<E>
Type Parameters:
E - the type of elements returned by the list iterable's list iterator
All Implemented Interfaces:
java.io.Serializable, java.lang.Iterable<E>, ListIterable<E>

public final class EmptyListIterable<E>
extends java.lang.Object
implements ListIterable<E>, java.io.Serializable

An EmptyListIterable is just that. Maybe just a touch better-performing than Collections.EMPTY_LIST since we don't create a new Iterator every time iterator() is called. (Not sure why they do that....)

Version:
2.5
See Also:
EmptyListIterator, EmptyIterable, Serialized Form
Since:
2.5

Method Summary
static
<T> ListIterable<T>
instance()
          Return the singleton instance of this ListIterable.
 java.util.ListIterator<E> iterator()
          
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

instance

public static <T> ListIterable<T> instance()
Return the singleton instance of this ListIterable.

Returns:
The singleton instance

iterator

public java.util.ListIterator<E> iterator()

Specified by:
iterator in interface java.lang.Iterable<E>
Specified by:
iterator in interface ListIterable<E>

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object

EclipseLink 2.5.0, build 'v20120919-fd7dc27' API Reference