|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openjena.atlas.iterator.Iter<T>
public class Iter<T>
Nested Class Summary | |
---|---|
static interface |
Iter.Folder<X,Y>
|
Method Summary | ||
---|---|---|
static
|
append(Iterable<T> iter1,
Iterable<T> iter2)
|
|
static
|
append(Iterator<? extends T> iter1,
Iterator<? extends T> iter2)
|
|
Iter<T> |
append(Iterator<T> iter)
|
|
void |
apply(Action<T> action)
|
|
static
|
apply(Iterable<? extends T> stream,
Action<T> action)
|
|
static
|
apply(Iterator<? extends T> stream,
Action<T> action)
|
|
static
|
apply(Map<K,V> map,
ActionKeyValue<K,V> action)
|
|
String |
asString()
|
|
static
|
asString(Iter<T> stream)
|
|
static
|
asString(Iter<T> stream,
AccString<T> formatter)
|
|
static
|
asString(Iter<T> stream,
String sep)
|
|
static
|
asString(Iterable<T> stream)
|
|
static
|
asString(Iterable<T> stream,
AccString<T> formatter)
|
|
static
|
asString(Iterable<T> stream,
String sep)
|
|
static
|
asString(Iterator<T> stream)
|
|
static
|
asString(Iterator<T> stream,
AccString<T> formatter)
|
|
static
|
asString(Iterator<T> stream,
String sep)
|
|
String |
asString(String sep)
|
|
static
|
close(Iterator<T> iter)
|
|
static
|
concat(Iter<T> iter1,
Iter<T> iter2)
|
|
static
|
concat(Iterator<T> iter1,
Iterator<T> iter2)
|
|
static
|
consume(Iterable<T> iterator)
Consume the iterable |
|
static
|
consume(Iterator<T> iterator)
Consume the iterator |
|
static
|
convert(Iterator<?> iterator)
|
|
long |
count()
Count the iterator (this is destructive on the iterator) |
|
static
|
count(Iterable<T> iterator)
Count the iterable - many iterable objects have a .size() operation which should be used in preference to this explicit counting operation |
|
static
|
count(Iterator<T> iterator)
Count the iterator (this is destructive on the iterator) |
|
static
|
debug(Iterator<T> stream)
|
|
Iter<T> |
distinct()
|
|
static
|
distinct(Iterable<T> iter)
|
|
static
|
distinct(Iterator<T> iter)
|
|
boolean |
every(Filter<T> filter)
|
|
static
|
every(Iterable<? extends T> stream,
Filter<T> filter)
Return true if every element of stream passes the filter (reads the stream) |
|
static
|
every(Iterator<? extends T> stream,
Filter<T> filter)
Return true if every element of stream passes the filter (reads the stream until the first element not passing the filter) |
|
Iter<T> |
filter(Filter<T> filter)
|
|
static
|
filter(Iterable<? extends T> stream,
Filter<T> filter)
|
|
static
|
filter(Iterator<? extends T> stream,
Filter<T> filter)
|
|
static
|
first(Collection<T> collection,
Filter<T> filter)
|
|
T |
first(Filter<T> filter)
|
|
static
|
first(Iterator<T> iter,
Filter<T> filter)
|
|
static
|
firstIndex(Collection<T> collection,
Filter<T> filter)
|
|
int |
firstIndex(Filter<T> filter)
|
|
static
|
firstIndex(Iterator<T> iter,
Filter<T> filter)
|
|
static
|
foldLeft(Iterable<? extends T> stream,
Iter.Folder<T,R> function,
R value)
|
|
static
|
foldLeft(Iterator<? extends T> stream,
Iter.Folder<T,R> function,
R value)
|
|
static
|
foldRight(Iterable<? extends T> stream,
Iter.Folder<T,R> function,
R value)
|
|
static
|
foldRight(Iterator<? extends T> stream,
Iter.Folder<T,R> function,
R value)
|
|
boolean |
hasNext()
|
|
static
|
iter(Collection<T> collection)
|
|
static
|
iter(Iter<T> iter)
|
|
static
|
iter(Iterable<T> iterable)
|
|
static
|
iter(Iterator<T> iterator)
|
|
Iterator<T> |
iterator()
|
|
static
|
last(Collection<T> collection,
Filter<T> filter)
|
|
T |
last(Filter<T> filter)
|
|
static
|
last(Iterator<T> iter,
Filter<T> filter)
|
|
static
|
lastIndex(Collection<T> collection,
Filter<T> filter)
|
|
int |
lastIndex(Filter<T> filter)
|
|
static
|
lastIndex(Iterator<T> iter,
Filter<T> filter)
|
|
static
|
map(Iterable<? extends T> stream,
Transform<T,R> converter)
|
|
static
|
map(Iterator<? extends T> stream,
Transform<T,R> converter)
|
|
static
|
map(List<? extends T> list,
Transform<T,R> converter)
|
|
|
map(Transform<T,R> converter)
|
|
static
|
mapMany(Iterable<? extends T> stream,
Transform<T,Iterator<R>> converter)
|
|
static
|
mapMany(Iterator<? extends T> stream,
Transform<? super T,Iterator<R>> converter)
Projects each element of a sequence to an Iterator<R> and flattens the resulting sequences into one sequence. |
|
static
|
mapMany(List<? extends T> list,
Transform<T,Iterator<R>> converter)
|
|
static
|
materialize(Iterator<T> iter)
Materializae an iterator, that is, force it to run now - useful in debugging |
|
T |
next()
|
|
static
|
notFilter(Iterable<? extends T> stream,
Filter<T> filter)
|
|
static
|
notFilter(Iterator<? extends T> stream,
Filter<T> filter)
|
|
static
|
nullIter()
|
|
static
|
nullIterator()
|
|
Iter<T> |
operate(Action<T> action)
Apply an action to everything in the stream, yielding a stream of the same items |
|
static
|
operate(Iterable<? extends T> stream,
Action<T> converter)
Apply an action to everything in stream, yielding a stream of the same items |
|
static
|
operate(Iterator<? extends T> stream,
Action<T> action)
Apply an action to everything in stream, yielding a stream of the same items |
|
static
|
printWrapper(Iterator<? extends T> stream)
Print an iterator as it gets used - this adds a printing wrapper |
|
static
|
printWrapper(PrintStream out,
Iterator<? extends T> stream)
Print an iterator as it gets used - this adds a printing wrapper |
|
|
reduce(Accumulate<T,R> aggregator)
|
|
static
|
reduce(Iterable<? extends T> stream,
Accumulate<T,R> aggregator)
|
|
static
|
reduce(Iterator<? extends T> stream,
Accumulate<T,R> aggregator)
|
|
void |
remove()
|
|
Iter<T> |
removeNulls()
|
|
static
|
removeNulls(Iterable<T> iter)
|
|
static
|
removeNulls(Iterator<T> iter)
|
|
static
|
sendToSink(Iterable<T> stream,
Sink<T> sink)
Send the elements of the iterator to a sink - consumes the iterator |
|
static
|
sendToSink(Iterator<T> iter,
Sink<T> sink)
Send the elements of the iterator to a sink - consumes the iterator |
|
void |
sendToSink(Sink<T> sink)
|
|
static
|
singleton(T item)
|
|
static
|
singletonIter(T item)
|
|
boolean |
some(Filter<T> filter)
|
|
static
|
some(Iterable<? extends T> stream,
Filter<T> filter)
Return true if every element of stream passes the filter (reads the stream until the first element passing the filter) |
|
static
|
some(Iterator<? extends T> stream,
Filter<T> filter)
Return true if one or more elements of stream passes the filter (reads the stream to first element passing the filter) |
|
List<T> |
toList()
|
|
static
|
toList(Iterable<? extends T> stream)
|
|
static
|
toList(Iterator<? extends T> stream)
|
|
Set<T> |
toSet()
|
|
static
|
toSet(Iterable<? extends T> stream)
|
|
static
|
toSet(Iterator<? extends T> stream)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <T> Iterator<T> singleton(T item)
public static <T> Iterator<T> nullIterator()
public static <T> Set<T> toSet(Iterable<? extends T> stream)
public static <T> Set<T> toSet(Iterator<? extends T> stream)
public static <T> List<T> toList(Iterable<? extends T> stream)
public static <T> List<T> toList(Iterator<? extends T> stream)
public static <T,R> R foldLeft(Iterable<? extends T> stream, Iter.Folder<T,R> function, R value)
public static <T,R> R foldLeft(Iterator<? extends T> stream, Iter.Folder<T,R> function, R value)
public static <T,R> R foldRight(Iterable<? extends T> stream, Iter.Folder<T,R> function, R value)
public static <T,R> R foldRight(Iterator<? extends T> stream, Iter.Folder<T,R> function, R value)
public static <T,R> R reduce(Iterable<? extends T> stream, Accumulate<T,R> aggregator)
public static <T,R> R reduce(Iterator<? extends T> stream, Accumulate<T,R> aggregator)
public static <T> void apply(Iterable<? extends T> stream, Action<T> action)
public static <T> void apply(Iterator<? extends T> stream, Action<T> action)
public static <K,V> void apply(Map<K,V> map, ActionKeyValue<K,V> action)
public static <T> Iterator<T> filter(Iterable<? extends T> stream, Filter<T> filter)
public static <T> Iterator<T> filter(Iterator<? extends T> stream, Filter<T> filter)
public static <T> Iterator<T> notFilter(Iterable<? extends T> stream, Filter<T> filter)
public static <T> Iterator<T> notFilter(Iterator<? extends T> stream, Filter<T> filter)
public static <T> boolean every(Iterable<? extends T> stream, Filter<T> filter)
public static <T> boolean every(Iterator<? extends T> stream, Filter<T> filter)
public static <T> boolean some(Iterable<? extends T> stream, Filter<T> filter)
public static <T> boolean some(Iterator<? extends T> stream, Filter<T> filter)
public static <T,R> Iterator<R> map(Iterable<? extends T> stream, Transform<T,R> converter)
public static <T,R> Iterator<R> map(Iterator<? extends T> stream, Transform<T,R> converter)
public static <T,R> List<R> map(List<? extends T> list, Transform<T,R> converter)
public static <T,R> Iterator<R> mapMany(Iterator<? extends T> stream, Transform<? super T,Iterator<R>> converter)
public static <T,R> Iterator<R> mapMany(Iterable<? extends T> stream, Transform<T,Iterator<R>> converter)
public static <T,R> List<R> mapMany(List<? extends T> list, Transform<T,Iterator<R>> converter)
public static <T> Iterator<T> operate(Iterable<? extends T> stream, Action<T> converter)
public static <T> Iterator<T> operate(Iterator<? extends T> stream, Action<T> action)
public static <T> Iterator<T> printWrapper(Iterator<? extends T> stream)
public static <T> Iterator<T> printWrapper(PrintStream out, Iterator<? extends T> stream)
public static <T> Iterator<T> append(Iterable<T> iter1, Iterable<T> iter2)
public static <T> Iterator<T> append(Iterator<? extends T> iter1, Iterator<? extends T> iter2)
public static <T> Iterator<T> distinct(Iterable<T> iter)
public static <T> Iterator<T> distinct(Iterator<T> iter)
public static <T> Iterator<T> removeNulls(Iterable<T> iter)
public static <T> Iterator<T> removeNulls(Iterator<T> iter)
public static <T> Iterator<T> convert(Iterator<?> iterator)
public static <T> long count(Iterable<T> iterator)
public static <T> long count(Iterator<T> iterator)
public static <T> void consume(Iterable<T> iterator)
public static <T> void consume(Iterator<T> iterator)
public static <T> String asString(Iterable<T> stream)
public static <T> String asString(Iterator<T> stream)
public static <T> String asString(Iter<T> stream)
public static <T> String asString(Iterable<T> stream, String sep)
public static <T> String asString(Iterator<T> stream, String sep)
public static <T> String asString(Iter<T> stream, String sep)
public static <T> String asString(Iterable<T> stream, AccString<T> formatter)
public static <T> String asString(Iterator<T> stream, AccString<T> formatter)
public static <T> String asString(Iter<T> stream, AccString<T> formatter)
public static <T> void close(Iterator<T> iter)
public static <T> Iterator<T> debug(Iterator<T> stream)
public static <T> void sendToSink(Iterator<T> iter, Sink<T> sink)
public static <T> void sendToSink(Iterable<T> stream, Sink<T> sink)
public static <T> Iter<T> iter(Iter<T> iter)
public static <T> Iter<T> iter(Collection<T> collection)
public static <T> Iter<T> iter(Iterator<T> iterator)
public static <T> Iter<T> iter(Iterable<T> iterable)
public static <T> Iterator<T> materialize(Iterator<T> iter)
public static <T> Iter<T> concat(Iter<T> iter1, Iter<T> iter2)
public static <T> Iterator<T> concat(Iterator<T> iter1, Iterator<T> iter2)
public static <T> T first(Iterator<T> iter, Filter<T> filter)
public static <T> T first(Collection<T> collection, Filter<T> filter)
public static <T> int firstIndex(Iterator<T> iter, Filter<T> filter)
public static <T> int firstIndex(Collection<T> collection, Filter<T> filter)
public static <T> T last(Iterator<T> iter, Filter<T> filter)
public static <T> T last(Collection<T> collection, Filter<T> filter)
public static <T> int lastIndex(Iterator<T> iter, Filter<T> filter)
public static <T> int lastIndex(Collection<T> collection, Filter<T> filter)
public Set<T> toSet()
public List<T> toList()
public void sendToSink(Sink<T> sink)
public T first(Filter<T> filter)
public int firstIndex(Filter<T> filter)
public T last(Filter<T> filter)
public int lastIndex(Filter<T> filter)
public Iter<T> filter(Filter<T> filter)
public boolean every(Filter<T> filter)
public boolean some(Filter<T> filter)
public Iter<T> removeNulls()
public <R> Iter<R> map(Transform<T,R> converter)
public Iter<T> operate(Action<T> action)
public <R> R reduce(Accumulate<T,R> aggregator)
public void apply(Action<T> action)
public Iter<T> append(Iterator<T> iter)
public long count()
public String asString()
public String asString(String sep)
public Iter<T> distinct()
public Iterator<T> iterator()
iterator
in interface Iterable<T>
public boolean hasNext()
hasNext
in interface Iterator<T>
public T next()
next
in interface Iterator<T>
public void remove()
remove
in interface Iterator<T>
public static <T> Iter<T> singletonIter(T item)
public static <T> Iter<T> nullIter()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |