From ada071e03e74811d9d23af3fc388733a1c3ff12f Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Mon, 27 May 2013 15:50:28 +0200 Subject: [PATCH] Expose source and sinks from the pipeline. --- .../net/pterodactylus/sonitus/data/Pipeline.java | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/main/java/net/pterodactylus/sonitus/data/Pipeline.java b/src/main/java/net/pterodactylus/sonitus/data/Pipeline.java index 4e6a457..9464f23 100644 --- a/src/main/java/net/pterodactylus/sonitus/data/Pipeline.java +++ b/src/main/java/net/pterodactylus/sonitus/data/Pipeline.java @@ -71,6 +71,32 @@ public class Pipeline { } // + // ACCESSORS + // + + /** + * Expose this pipeline’s source. + * + * @return This pipeline’s source + */ + public Source source() { + return source; + } + + /** + * Returns all {@link Sink}s (or {@link Filter}s, really) that are connected to + * the given source. + * + * @param source + * The source to get the sinks for + * @return The sinks connected to the given source, or an empty list if the + * source does not exist in this pipeline + */ + public Collection sinks(Source source) { + return sinks.get(source); + } + + // // ACTIONS // -- 2.7.4