You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CharIterator.java 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * Copyright 1999-2004 The Apache Software Foundation.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. /* $Id$ */
  17. package org.apache.fop.fo;
  18. import java.util.Iterator;
  19. import java.util.NoSuchElementException;
  20. /**
  21. * Interface for iterators that should iterate through a series of characters.
  22. * Extends the java.util.Iterator interface with some additional functions
  23. * useful for FOP's management of text.
  24. */
  25. public interface CharIterator extends Iterator {
  26. /**
  27. * @return the character that is the next character in the collection
  28. * @throws NoSuchElementException if there are no more characters (test for
  29. * this condition with java.util.Iterator.hasNext()).
  30. */
  31. char nextChar() throws NoSuchElementException ;
  32. /**
  33. * Replace the current character managed by the iterator with a specified
  34. * character?
  35. * @param c character
  36. */
  37. void replaceChar(char c);
  38. /**
  39. * @return cloned Object
  40. */
  41. Object clone();
  42. }