org.apache.fop.fo

Class OneCharIterator

Implemented Interfaces:
Cloneable, Iterator

public class OneCharIterator
extends CharIterator

Class providing an iterator for one character.

Constructor Summary

OneCharIterator(char c)
Constructor

Method Summary

boolean
hasNext()
char
nextChar()

Methods inherited from class org.apache.fop.fo.CharIterator

clone, hasNext, next, nextChar, remove, replaceChar

Constructor Details

OneCharIterator

public OneCharIterator(char c)
Constructor
Parameters:
c - the character that this iterator should iterate.

Method Details

hasNext

public boolean hasNext()
Overrides:
hasNext in interface CharIterator
Returns:
true if there is another element in the collection over which to iterate (since this iterator only handles one character, this will return false if it is past that character).

nextChar

public char nextChar()
            throws NoSuchElementException
Overrides:
nextChar in interface CharIterator
Returns:
the next character, if there is one (since there is only one character over which to iterate, it must be the first character).

Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.