Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Coherence
12c (12.1.3.0.0)

E47890-01


com.tangosol.util
Class NullImplementation.NullEnumerator

java.lang.Object
  extended by com.tangosol.util.NullImplementation.NullEnumerator

All Implemented Interfaces:
java.lang.Iterable, java.util.Enumeration, java.util.Iterator
Enclosing class:
NullImplementation

public static class NullImplementation.NullEnumerator
extends java.lang.Object
implements java.util.Enumeration, java.util.Iterator, java.lang.Iterable

An empty enumerator.


Field Summary
static NullImplementation.NullEnumerator INSTANCE
          Since the enumerator contains no information, only one ever has to exist.

 

Method Summary
 boolean hasMoreElements()
          Tests if this enumeration contains more elements.
 boolean hasNext()
          Returns true if the iteration has more elements.
 java.util.Iterator iterator()
          Returns an Iterator instance with no values to enumerate.
 java.lang.Object next()
          Returns the next element in the interation.
 java.lang.Object nextElement()
          Returns the next element of this enumeration if this enumeration object has at least one more element to provide.
 void remove()
          Removes from the underlying Collection the last element returned by the Iterator .

 

Field Detail

INSTANCE

public static final NullImplementation.NullEnumerator INSTANCE
Since the enumerator contains no information, only one ever has to exist.

Method Detail

hasMoreElements

public boolean hasMoreElements()
Tests if this enumeration contains more elements.
Specified by:
hasMoreElements in interface java.util.Enumeration
Returns:
false

nextElement

public java.lang.Object nextElement()
Returns the next element of this enumeration if this enumeration object has at least one more element to provide.
Specified by:
nextElement in interface java.util.Enumeration
Returns:
the next element of this enumeration.
Throws:
java.util.NoSuchElementException - always

hasNext

public boolean hasNext()
Returns true if the iteration has more elements.
Specified by:
hasNext in interface java.util.Iterator

next

public java.lang.Object next()
Returns the next element in the interation.
Specified by:
next in interface java.util.Iterator
Throws:
java.util.NoSuchElementException - iteration has no more elements.

remove

public void remove()
Removes from the underlying Collection the last element returned by the Iterator . This method can be called only once per call to next The behavior of an Iterator is unspecified if the underlying Collection is modified while the iteration is in progress in any way other than by calling this method. Optional operation.
Specified by:
remove in interface java.util.Iterator
Throws:
java.lang.IllegalStateException - next has not yet been called, or remove has already been called after the last call to next.

iterator

public java.util.Iterator iterator()
Returns an Iterator instance with no values to enumerate.
Specified by:
iterator in interface java.lang.Iterable
Returns:
an Iterator instance with no values to enumerate

Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Coherence
12c (12.1.3.0.0)

E47890-01


Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.