projects
/
xudocci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add input stream that counts its consumed bandwidth.
[xudocci.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
xdcc
/
data
/
Bot.java
diff --git
a/src/main/java/net/pterodactylus/xdcc/data/Bot.java
b/src/main/java/net/pterodactylus/xdcc/data/Bot.java
index
33bec20
..
724f0e0
100644
(file)
--- a/
src/main/java/net/pterodactylus/xdcc/data/Bot.java
+++ b/
src/main/java/net/pterodactylus/xdcc/data/Bot.java
@@
-18,9
+18,10
@@
package net.pterodactylus.xdcc.data;
import java.util.Collection;
package net.pterodactylus.xdcc.data;
import java.util.Collection;
+import java.util.Iterator;
import java.util.Map;
import java.util.Map;
-import com.
beust.jcommander.internal
.Maps;
+import com.
google.common.collect
.Maps;
/**
* A bot is a client in a {@link Network} that carries {@link Pack}s which are
/**
* A bot is a client in a {@link Network} that carries {@link Pack}s which are
@@
-28,7
+29,7
@@
import com.beust.jcommander.internal.Maps;
*
* @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
*/
*
* @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
*/
-public class Bot {
+public class Bot
implements Iterable<Pack>
{
/** The network this bot is on. */
private final Network network;
/** The network this bot is on. */
private final Network network;
@@
-111,6
+112,15
@@
public class Bot {
}
//
}
//
+ // ITERABLE METHODS
+ //
+
+ @Override
+ public Iterator<Pack> iterator() {
+ return packs.values().iterator();
+ }
+
+ //
// OBJECT METHODS
//
// OBJECT METHODS
//