de.rwth.utils
Class IteratorTools
java.lang.Object
|
+--de.rwth.utils.IteratorTools
- public class IteratorTools
- extends java.lang.Object
A collection of useful methods for iterators.
- Version:
- $Id: IteratorTools.java,v 1.2 2002/09/17 06:53:53 mohnen Exp $
- Author:
- Markus Mohnen
Method Summary |
static void |
printIterator(java.util.Iterator i)
Prints all pending elements of an iterator to System.out . |
static void |
printIterator(java.util.Iterator i,
java.io.PrintStream s)
Prints all pending elements of an iterator to a PrintStream . |
static void |
printlnIterator(java.util.Iterator i)
Prints all pending elements of an iterator to System.out and prints
a newline character afterwards. |
static void |
printlnIterator(java.util.Iterator i,
java.io.PrintStream s)
Prints all pending elements of an iterator to a PrintStream and
prints a newline character afterwards. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IteratorTools
public IteratorTools()
printIterator
public static void printIterator(java.util.Iterator i,
java.io.PrintStream s)
- Prints all pending elements of an iterator to a
PrintStream
.
- Parameters:
i
- an Iterator
values
- a PrintStream
value
printlnIterator
public static void printlnIterator(java.util.Iterator i,
java.io.PrintStream s)
- Prints all pending elements of an iterator to a
PrintStream
and
prints a newline character afterwards.
- Parameters:
i
- an Iterator
values
- a PrintStream
value
printIterator
public static void printIterator(java.util.Iterator i)
- Prints all pending elements of an iterator to
System.out
.
- Parameters:
i
- an Iterator
value
printlnIterator
public static void printlnIterator(java.util.Iterator i)
- Prints all pending elements of an iterator to
System.out
and prints
a newline character afterwards.
- Parameters:
i
- an Iterator
values
- a PrintStream
value