public class CmdLineIterable<T> extends Object implements Iterable<T>
Iterable which allows multiple concurrent iterators which affect
each other, also allows you to increment iterators index manually. All
iterators handle termination safely. However, the catch being that you can
only iterate through this Iterable once, then you must create a new
object of it to iterate over it again.| Constructor and Description |
|---|
CmdLineIterable(List<T> args) |
| Modifier and Type | Method and Description |
|---|---|
void |
descrementIndex() |
T |
getAndIncrement() |
T |
getArg(int index) |
List<T> |
getArgs() |
List<T> |
getArgsLeft() |
T |
getCurrentArg() |
int |
getCurrentIndex() |
boolean |
hasNext() |
T |
incrementAndGet() |
void |
incrementIndex() |
Iterator<T> |
iterator() |
int |
numArgs() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic int getCurrentIndex()
public void incrementIndex()
public void descrementIndex()
public T incrementAndGet()
public T getAndIncrement()
public int numArgs()
public T getArg(int index)
public boolean hasNext()
public T getCurrentArg()
Copyright © 1999–2017 Apache OODT. All rights reserved.