Add name to all controlled components.
[sonitus.git] / src / main / java / net / pterodactylus / sonitus / data / filter / DummyFilter.java
index 9d81923..ce02254 100644 (file)
@@ -40,6 +40,9 @@ import com.google.common.io.Closeables;
  */
 public class DummyFilter implements Filter {
 
+       /** The name of this filter. */
+       private final String name;
+
        /** The input stream from which to read. */
        private InputStream inputStream;
 
@@ -49,11 +52,26 @@ public class DummyFilter implements Filter {
        /** The current metadata. */
        private Metadata metadata;
 
+       /**
+        * Creates a new dummy filter with the given name.
+        *
+        * @param name
+        *              The name of the filter
+        */
+       public DummyFilter(String name) {
+               this.name = name;
+       }
+
        //
        // CONTROLLED METHODS
        //
 
        @Override
+       public String name() {
+               return name;
+       }
+
+       @Override
        public List<Controller<?>> controllers() {
                return Collections.emptyList();
        }