Fucking Java 5
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6158 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -36,23 +36,21 @@ public class SelectorIterable
|
||||
_failureHandler = handler;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator<SelectionKey> iterator ()
|
||||
{
|
||||
final Iterator<SelectionKey> it = select().iterator();
|
||||
return new Iterator<SelectionKey>() {
|
||||
@Override public boolean hasNext () {
|
||||
public boolean hasNext () {
|
||||
return it.hasNext();
|
||||
}
|
||||
|
||||
@Override
|
||||
public SelectionKey next () {
|
||||
SelectionKey key = it.next();
|
||||
it.remove();
|
||||
return key;
|
||||
}
|
||||
|
||||
@Override public void remove () {
|
||||
public void remove () {
|
||||
throw new UnsupportedOperationException(
|
||||
"Removing from the selected keys is done automatically on next()");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user