diff --git a/library/src/main/java/com/google/android/material/motion/streams/MotionObservable.java b/library/src/main/java/com/google/android/material/motion/streams/MotionObservable.java index c9aeb8b..ee06c98 100644 --- a/library/src/main/java/com/google/android/material/motion/streams/MotionObservable.java +++ b/library/src/main/java/com/google/android/material/motion/streams/MotionObservable.java @@ -69,32 +69,32 @@ public MotionObservable(Subscriber> subscriber) { /** * An observer with an additional {@link #state(int)} method. */ - public interface MotionObserver extends Observer { + public static abstract class MotionObserver implements Observer { @Override - void next(T value); + public abstract void next(T value); /** * A method to handle new incoming state values. */ - void state(@MotionState int state); + public abstract void state(@MotionState int state); } /** * An operation is able to transform incoming values before choosing whether or not to pass them - * to the observer. + * downstream. * * @param The incoming value type. - * @param The observer value type. + * @param The downstream value type. */ - public interface Operation { + public static abstract class Operation { /** * Transforms the incoming value before passing it to the observer, or blocks the value. * * @param value The incoming value. */ - void next(MotionObserver observer, T value); + public abstract void next(MotionObserver observer, T value); } /** @@ -103,23 +103,23 @@ public interface Operation { * @param The incoming value type. * @param The downstream value type. */ - public interface Transformation { + public static abstract class Transformation { /** * Transforms the given value. */ - U transform(T value); + public abstract U transform(T value); } /** * A predicate evaluates whether to pass a value downstream. */ - public interface Predicate { + public static abstract class Predicate { /** * Evaluates whether to pass the value. */ - boolean evaluate(T value); + public abstract boolean evaluate(T value); } /**