// Path: library/src/main/java/com/google/android/material/motion/MapOperation.java
// public abstract class MapOperation<T, U> extends Operation<T, U> {
// 
//   /**
//    * Transforms the given value to another value.
//    */
//   public abstract U transform(T value);
// 
//   @Override
//   public final void next(MotionObserver<U> observer, T value) {
//     observer.next(transform(value));
//   }
// }
// 
// Path: library/src/main/java/com/google/android/material/motion/MotionObserver.java
// public abstract class MotionObserver<T> extends Observer<T> {
// 
//   @Override
//   public abstract void next(T value);
// 
//   public abstract void build(MotionBuilder<T> builder, T... values);
// 
//   /**
//    * A simple observer for when you only want to implement {@link #next(Object)}.
//    */
//   public static abstract class SimpleMotionObserver<T> extends MotionObserver<T> {
//     @Override
//     public void build(MotionBuilder<T> builder, T[] values) {
//     }
//   }
// }
// 
// Path: library/src/main/java/com/google/android/material/motion/Operation.java
// public abstract class Operation<T, U> {
// 
//   public void preConnect(MotionObserver<U> observer) {
//   }
// 
//   /**
//    * Transforms the incoming value before passing it to the observer, or blocks the value.
//    *
//    * @param value The incoming value.
//    */
//   public abstract void next(MotionObserver<U> observer, T value);
// 
//   public void postConnect(MotionObserver<U> observer) {
//   }
// 
//   public void preDisconnect(MotionObserver<U> observer) {
//   }
// 
//   public void postDisconnect(MotionObserver<U> observer) {
//   }
// }
// 
// Path: library/src/main/java/com/google/android/material/motion/SameTypedMapOperation.java
// public abstract class SameTypedMapOperation<T> extends MapOperation<T, T> {
// 
//   public final void build(MotionObserver<T> observer, MotionBuilder<T> builder, T[] values) {
//     for (int i = 0; i < values.length; i++) {
//       values[i] = transform(values[i]);
//     }
//     observer.build(builder, values);
//   }
// }


import android.support.annotation.VisibleForTesting;
import android.support.v4.util.SimpleArrayMap;
import com.google.android.material.motion.MapOperation;
import com.google.android.material.motion.MotionObserver;
import com.google.android.material.motion.Operation;
import com.google.android.material.motion.SameTypedMapOperation;
import java.util.Map;
package com.google.android.material.motion.operators;




public final class Rewrite {

  @VisibleForTesting
  Rewrite() {
    throw new UnsupportedOperationException();
  }

  public static <T, U> Operation<T, U> rewriteTo(final U value) {
    return new MapOperation<T, U>() {
      @Override
      public U transform(T ignored) {
        return value;
      }
    };
  }

  public static <T, U> Operation<T, U> rewrite(T from, U to) {
// Path: library/src/main/java/com/google/android/material/motion/MapOperation.java
// public abstract class MapOperation<T, U> extends Operation<T, U> {
// 
//   /**
//    * Transforms the given value to another value.
//    */
//   public abstract U transform(T value);
// 
//   @Override
//   public final void next(MotionObserver<U> observer, T value) {
//     observer.next(transform(value));
//   }
// }
// 
// Path: library/src/main/java/com/google/android/material/motion/MotionObserver.java
// public abstract class MotionObserver<T> extends Observer<T> {
// 
//   @Override
//   public abstract void next(T value);
// 
//   public abstract void build(MotionBuilder<T> builder, T... values);
// 
//   /**
//    * A simple observer for when you only want to implement {@link #next(Object)}.
//    */
//   public static abstract class SimpleMotionObserver<T> extends MotionObserver<T> {
//     @Override
//     public void build(MotionBuilder<T> builder, T[] values) {
//     }
//   }
// }
// 
// Path: library/src/main/java/com/google/android/material/motion/Operation.java
// public abstract class Operation<T, U> {
// 
//   public void preConnect(MotionObserver<U> observer) {
//   }
// 
//   /**
//    * Transforms the incoming value before passing it to the observer, or blocks the value.
//    *
//    * @param value The incoming value.
//    */
//   public abstract void next(MotionObserver<U> observer, T value);
// 
//   public void postConnect(MotionObserver<U> observer) {
//   }
// 
//   public void preDisconnect(MotionObserver<U> observer) {
//   }
// 
//   public void postDisconnect(MotionObserver<U> observer) {
//   }
// }
// 
// Path: library/src/main/java/com/google/android/material/motion/SameTypedMapOperation.java
// public abstract class SameTypedMapOperation<T> extends MapOperation<T, T> {
// 
//   public final void build(MotionObserver<T> observer, MotionBuilder<T> builder, T[] values) {
//     for (int i = 0; i < values.length; i++) {
//       values[i] = transform(values[i]);
//     }
//     observer.build(builder, values);
//   }
// }


// Path: library/src/main/java/com/google/android/material/motion/operators/Rewrite.java
import android.support.annotation.VisibleForTesting;
import android.support.v4.util.SimpleArrayMap;
import com.google.android.material.motion.MapOperation;
import com.google.android.material.motion.MotionObserver;
import com.google.android.material.motion.Operation;
import com.google.android.material.motion.SameTypedMapOperation;
import java.util.Map;

package com.google.android.material.motion.operators;




public final class Rewrite {

  @VisibleForTesting
  Rewrite() {
    throw new UnsupportedOperationException();
  }

  public static <T, U> Operation<T, U> rewriteTo(final U value) {
    return new MapOperation<T, U>() {
      @Override
      public U transform(T ignored) {
        return value;
      }
    };
  }

  public static <T, U> Operation<T, U> rewrite(T from, U to) {
    return new Operation<T, U>() {