Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal
11g Release 1 (11.1.1.6.0)
E15995-04


oracle.webcenter.search.util
Class ConverterIterator<S,T>

java.lang.Object
  extended by oracle.webcenter.search.util.ConverterIterator<S,T>

All Implemented Interfaces:
java.util.Iterator<T>
Direct Known Subclasses:
AbstractConverterQueryResult

public abstract class ConverterIterator<S,T>
extends java.lang.Object
implements java.util.Iterator<T>

A generic utility decorator abstract base class of Iterator that allows subclasses to convert between a source iterator element type and a target iterator element type.

Since:
11.1.1.0.0 Beta 2

Constructor Summary
protected ConverterIterator(java.util.Iterator<S> source)
          Only called by subclasses, constructs an Iterator that converts objects of type S to objects of type T.

 

Method Summary
protected abstract  T convert(S source)
          Subclasses implement this method to perform the conversion from a source class S to a target class T.
 boolean hasNext()
          Wrapped implementation of the Iterator.hasNext method.
 T next()
          Wrapped implementation of the Iterator.next method.
 void remove()
          Forward the call to the underlying source iteratro

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

ConverterIterator

protected ConverterIterator(java.util.Iterator<S> source)
Only called by subclasses, constructs an Iterator that converts objects of type S to objects of type T.
Parameters:
source - the source iterator of type S

Method Detail

hasNext

public boolean hasNext()
Wrapped implementation of the Iterator.hasNext method.
Specified by:
hasNext in interface java.util.Iterator<T>
Returns:
true if there are more elements to be iterated

next

public T next()
Wrapped implementation of the Iterator.next method.
Specified by:
next in interface java.util.Iterator<T>
Returns:
a T object that represents the next item in the target Iterator

remove

public void remove()
Forward the call to the underlying source iteratro
Specified by:
remove in interface java.util.Iterator<T>

convert

protected abstract T convert(S source)
Subclasses implement this method to perform the conversion from a source class S to a target class T.
Parameters:
source - a source S object that needs to be converted into a target T object
Returns:
a T that is the converted result

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal
11g Release 1 (11.1.1.6.0)
E15995-04


Copyright © 2009, 2011, Oracle and/or its affiliates. All rights reserved.