// Path: agera/src/main/java/com/google/android/agera/Common.java
// static final class StaticProducer<TFirst, TSecond, TTo>
//     implements Supplier<TTo>, Function<TFirst, TTo>, Merger<TFirst, TSecond, TTo> {
//   @NonNull
//   private final TTo staticValue;
// 
//   StaticProducer(@NonNull final TTo staticValue) {
//     this.staticValue = checkNotNull(staticValue);
//   }
// 
//   @NonNull
//   @Override
//   public TTo apply(@NonNull final TFirst input) {
//     return staticValue;
//   }
// 
//   @NonNull
//   @Override
//   public TTo merge(@NonNull final TFirst o, @NonNull final TSecond o2) {
//     return staticValue;
//   }
// 
//   @NonNull
//   @Override
//   public TTo get() {
//     return staticValue;
//   }
// }


import static com.google.android.agera.Preconditions.checkNotNull;
import android.support.annotation.NonNull;
import com.google.android.agera.Common.StaticProducer;
/*
 * Copyright 2015 Google Inc. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.google.android.agera;



/**
 * Utility methods for obtaining {@link Supplier} instances.
 */
public final class Suppliers {

  /**
   * Returns a {@link Supplier} that always supplies the given {@code object} when its
   * {@link Supplier#get()} is called.
   */
  @NonNull
  public static <T> Supplier<T> staticSupplier(@NonNull final T object) {
// Path: agera/src/main/java/com/google/android/agera/Common.java
// static final class StaticProducer<TFirst, TSecond, TTo>
//     implements Supplier<TTo>, Function<TFirst, TTo>, Merger<TFirst, TSecond, TTo> {
//   @NonNull
//   private final TTo staticValue;
// 
//   StaticProducer(@NonNull final TTo staticValue) {
//     this.staticValue = checkNotNull(staticValue);
//   }
// 
//   @NonNull
//   @Override
//   public TTo apply(@NonNull final TFirst input) {
//     return staticValue;
//   }
// 
//   @NonNull
//   @Override
//   public TTo merge(@NonNull final TFirst o, @NonNull final TSecond o2) {
//     return staticValue;
//   }
// 
//   @NonNull
//   @Override
//   public TTo get() {
//     return staticValue;
//   }
// }


// Path: agera/src/main/java/com/google/android/agera/Suppliers.java
import static com.google.android.agera.Preconditions.checkNotNull;
import android.support.annotation.NonNull;
import com.google.android.agera.Common.StaticProducer;

/*
 * Copyright 2015 Google Inc. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.google.android.agera;



/**
 * Utility methods for obtaining {@link Supplier} instances.
 */
public final class Suppliers {

  /**
   * Returns a {@link Supplier} that always supplies the given {@code object} when its
   * {@link Supplier#get()} is called.
   */
  @NonNull
  public static <T> Supplier<T> staticSupplier(@NonNull final T object) {
    return new StaticProducer<>(object);