package rx.broadcast;

import rx.Observable;

/**
 * A {@code Broadcast} represents both a producer and subscriber of messages.
 */
public interface Broadcast {
    /**
     * Broadcasts the given value when the returned {@code Observable} is subscribed to.
     * @param value the value to broadcast
     * @return an Observable stream representing the message sent status
     */
    Observable<Void> send(Object value);

    /**
     * Returns a (hot) {@code Observable} stream of broadcasted values.
     * @param clazz the class type to filter the broadcasted values by
     * @param <T> the output stream type
     * @return an Observable stream of broadcasted values
     */
    <T> Observable<T> valuesOfType(Class<T> clazz);
}

@@ -16,16 +16,59 @@
 dcast;%0A%0A
+import org.jetbrains.annotations.Contract;%0A
 import r
@@ -81,16 +81,16 @@
 rvable;%0A
-
 %0A/**%0A * 
@@ -414,24 +414,51 @@
 tus%0A     */%0A
+    @Contract(pure = true)%0A
     Observab
@@ -737,24 +737,24 @@
  values%0A
-
      */%0A
     %3CT%3E 
@@ -741,24 +741,51 @@
 ues%0A     */%0A
+    @Contract(pure = true)%0A
     %3CT%3E Obse

Mark Broadcast methods as pure