Witless
Un blog de actualización irregular. Irregular updates. Don't hold your breath.
Thursday, April 26, 2012
Iterable interface
Learnt a new thing in Java today:
Given a class:
public class DocumentPreprocessor implements Iterable
> {
...
public Iterator
> iterator()
}
You can use it like this:
for (List
sentence : new DocumentPreprocessor(filename)) { ... }
Which I didn't know. So there you go. Learn a new thing everyday :)
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment