Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.hp.hpl.jena.util.iterator
Class SingletonIterator

    java.lang.Object
      com.hp.hpl.jena.util.iterator.NiceIterator
          com.hp.hpl.jena.util.iterator.SingletonIterator

All Implemented Interfaces:
  ClosableIterator, ExtendedIterator, java.util.Iterator

    public class SingletonIterator

extends NiceIterator
implements ExtendedIterator

A ClosableIterator that contains only one element

Version:
  $Revision: 1.10 $ on $Date: 2008/01/02 12:07:36 $
Author:
  Dave Reynolds

Constructor Summary
`SingletonIterator(java.lang.Object element)` Constructor

Method Summary
`boolean` | `hasNext()` Can return a single value
`java.lang.Object` | `next()` Return the value

Methods inherited from class com.hp.hpl.jena.util.iterator.NiceIterator
`andThen, andThen, asList, asSet, close, close, emptyIterator, filterDrop, filterKeep, mapWith, remove, removeNext, toList, toSet`

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

Methods inherited from interface com.hp.hpl.jena.util.iterator.ExtendedIterator
`andThen, filterDrop, filterKeep, mapWith, removeNext, toList, toSet`

Methods inherited from interface com.hp.hpl.jena.util.iterator.ClosableIterator
`close`

Methods inherited from interface java.util.Iterator
`remove`

Constructor Detail

### SingletonIterator

    public SingletonIterator(java.lang.Object element)

  Constructor

  Parameters:
    `element` - the single value to be returned

Method Detail

### hasNext

    public boolean hasNext()

  Can return a single value

  Specified by:
    `hasNext` in interface `java.util.Iterator`
  Overrides:
    `hasNext` in class `NiceIterator`

### next

    public java.lang.Object next()

  Return the value

  Specified by:
    `next` in interface `java.util.Iterator`
  Overrides:
    `next` in class `NiceIterator`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP