01: /*
02: * Primitive Collections for Java.
03: * Copyright (C) 2002 S�ren Bak
04: *
05: * This library is free software; you can redistribute it and/or
06: * modify it under the terms of the GNU Lesser General Public
07: * License as published by the Free Software Foundation; either
08: * version 2.1 of the License, or (at your option) any later version.
09: *
10: * This library is distributed in the hope that it will be useful,
11: * but WITHOUT ANY WARRANTY; without even the implied warranty of
12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13: * Lesser General Public License for more details.
14: *
15: * You should have received a copy of the GNU Lesser General Public
16: * License along with this library; if not, write to the Free Software
17: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18: */
19: package com.uwyn.rife.pcj;
20:
21: /**
22: * This class represents iterators over collections of char values.
23: *
24: * @see java.util.Iterator
25: *
26: * @author Søren Bak
27: * @version 1.0 2002/29/12
28: * @since 1.0
29: */
30: public interface CharIterator {
31:
32: /**
33: * Indicates whether more char values can be returned by this
34: * iterator.
35: *
36: * @return <tt>true</tt> if more char values can be returned
37: * by this iterator; returns <tt>false</tt>
38: * otherwise.
39: *
40: * @see #next()
41: */
42: boolean hasNext();
43:
44: /**
45: * Returns the next char value of this iterator.
46: *
47: * @return the next char value of this iterator.
48: *
49: * @throws NoSuchElementException
50: * if no more elements are available from this
51: * iterator.
52: *
53: * @see #hasNext()
54: */
55: char next();
56:
57: /**
58: * Removes the last char value returned from the underlying
59: * collection.
60: *
61: * @throws UnsupportedOperationException
62: * if removal is not supported by this iterator.
63: *
64: * @throws IllegalStateException
65: * if no element has been returned by this iterator
66: * yet.
67: */
68: void remove();
69:
70: }
|