// Path: observable-cache-1/src/main/java/com/github/aleksandermielczarek/observablecache/CacheableCompletable.java
// public final class CacheableCompletable implements Completable.Transformer {
// 
//     private final String key;
//     private final ObservableCache observableCache;
// 
//     public CacheableCompletable(String key, ObservableCache observableCache) {
//         this.key = key;
//         this.observableCache = observableCache;
//     }
// 
//     @Override
//     public Completable call(Completable completable) {
//         return observableCache.cacheCompletable(key, completable);
//     }
// }
// 
// Path: observable-cache-1/src/main/java/com/github/aleksandermielczarek/observablecache/CacheableObservable.java
// public final class CacheableObservable<T> implements Observable.Transformer<T, T> {
// 
//     private final String key;
//     private final ObservableCache observableCache;
// 
//     public CacheableObservable(String key, ObservableCache observableCache) {
//         this.key = key;
//         this.observableCache = observableCache;
//     }
// 
//     @Override
//     public Observable<T> call(Observable<T> observable) {
//         return observableCache.cacheObservable(key, observable);
//     }
// }
// 
// Path: observable-cache-1/src/main/java/com/github/aleksandermielczarek/observablecache/CacheableSingle.java
// public final class CacheableSingle<T> implements Single.Transformer<T, T> {
// 
//     private final String key;
//     private final ObservableCache observableCache;
// 
//     public CacheableSingle(String key, ObservableCache observableCache) {
//         this.key = key;
//         this.observableCache = observableCache;
//     }
// 
//     @Override
//     public Single<T> call(Single<T> single) {
//         return observableCache.cacheSingle(key, single);
//     }
// }
// 
// Path: observable-cache-1/src/main/java/com/github/aleksandermielczarek/observablecache/CompletableFromCache.java
// public final class CompletableFromCache extends ValueFromCache<Completable> {
// 
//     public CompletableFromCache() {
//         this(null);
//     }
// 
//     public CompletableFromCache(@Nullable Completable valueFromCache) {
//         super(valueFromCache);
//     }
// 
//     public static CompletableFromCache empty() {
//         return new CompletableFromCache();
//     }
// 
//     public static CompletableFromCache of(@Nullable Completable valueFromCache) {
//         return new CompletableFromCache(valueFromCache);
//     }
// 
// }
// 
// Path: observable-cache-1/src/main/java/com/github/aleksandermielczarek/observablecache/ObservableFromCache.java
// public final class ObservableFromCache<T> extends ValueFromCache<Observable<T>> {
// 
//     public ObservableFromCache() {
//         this(null);
//     }
// 
//     public ObservableFromCache(@Nullable Observable<T> valueFromCache) {
//         super(valueFromCache);
//     }
// 
//     public static <T> ObservableFromCache<T> empty() {
//         return new ObservableFromCache<>();
//     }
// 
//     public static <T> ObservableFromCache<T> of(@Nullable Observable<T> valueFromCache) {
//         return new ObservableFromCache<>(valueFromCache);
//     }
// 
// }
// 
// Path: observable-cache-1/src/main/java/com/github/aleksandermielczarek/observablecache/SingleFromCache.java
// public final class SingleFromCache<T> extends ValueFromCache<Single<T>> {
// 
//     public SingleFromCache() {
//         this(null);
//     }
// 
//     public SingleFromCache(@Nullable Single<T> valueFromCache) {
//         super(valueFromCache);
//     }
// 
//     public static <T> SingleFromCache<T> empty() {
//         return new SingleFromCache<>();
//     }
// 
//     public static <T> SingleFromCache<T> of(@Nullable Single<T> valueFromCache) {
//         return new SingleFromCache<>(valueFromCache);
//     }
// 
// }


import com.github.aleksandermielczarek.observablecache.CacheableCompletable;
import com.github.aleksandermielczarek.observablecache.CacheableObservable;
import com.github.aleksandermielczarek.observablecache.CacheableSingle;
import com.github.aleksandermielczarek.observablecache.CompletableFromCache;
import com.github.aleksandermielczarek.observablecache.ObservableFromCache;
import com.github.aleksandermielczarek.observablecache.SingleFromCache;
import com.github.aleksandermielczarek.observablecache.service.annotations.ObservableCacheService;
package com.github.aleksandermielczarek.observablecacheexample.service;


/**
 * Created by Aleksander Mielczarek on 30.10.2016.
 */
@ObservableCacheService
public interface Cached1Service {

    CacheableObservable<String> observable();

    ObservableFromCache<String> cachedObservable();

    CacheableSingle<String> single();

    SingleFromCache<String> cachedSingle();

    CacheableCompletable completable();

    CompletableFromCache cachedCompletable();

    CacheableObservable<String> observableError();

    ObservableFromCache<String> cachedObservableError();

    CacheableSingle<String> singleError();

// Path: observable-cache-1/src/main/java/com/github/aleksandermielczarek/observablecache/CacheableCompletable.java
// public final class CacheableCompletable implements Completable.Transformer {
// 
//     private final String key;
//     private final ObservableCache observableCache;
// 
//     public CacheableCompletable(String key, ObservableCache observableCache) {
//         this.key = key;
//         this.observableCache = observableCache;
//     }
// 
//     @Override
//     public Completable call(Completable completable) {
//         return observableCache.cacheCompletable(key, completable);
//     }
// }
// 
// Path: observable-cache-1/src/main/java/com/github/aleksandermielczarek/observablecache/CacheableObservable.java
// public final class CacheableObservable<T> implements Observable.Transformer<T, T> {
// 
//     private final String key;
//     private final ObservableCache observableCache;
// 
//     public CacheableObservable(String key, ObservableCache observableCache) {
//         this.key = key;
//         this.observableCache = observableCache;
//     }
// 
//     @Override
//     public Observable<T> call(Observable<T> observable) {
//         return observableCache.cacheObservable(key, observable);
//     }
// }
// 
// Path: observable-cache-1/src/main/java/com/github/aleksandermielczarek/observablecache/CacheableSingle.java
// public final class CacheableSingle<T> implements Single.Transformer<T, T> {
// 
//     private final String key;
//     private final ObservableCache observableCache;
// 
//     public CacheableSingle(String key, ObservableCache observableCache) {
//         this.key = key;
//         this.observableCache = observableCache;
//     }
// 
//     @Override
//     public Single<T> call(Single<T> single) {
//         return observableCache.cacheSingle(key, single);
//     }
// }
// 
// Path: observable-cache-1/src/main/java/com/github/aleksandermielczarek/observablecache/CompletableFromCache.java
// public final class CompletableFromCache extends ValueFromCache<Completable> {
// 
//     public CompletableFromCache() {
//         this(null);
//     }
// 
//     public CompletableFromCache(@Nullable Completable valueFromCache) {
//         super(valueFromCache);
//     }
// 
//     public static CompletableFromCache empty() {
//         return new CompletableFromCache();
//     }
// 
//     public static CompletableFromCache of(@Nullable Completable valueFromCache) {
//         return new CompletableFromCache(valueFromCache);
//     }
// 
// }
// 
// Path: observable-cache-1/src/main/java/com/github/aleksandermielczarek/observablecache/ObservableFromCache.java
// public final class ObservableFromCache<T> extends ValueFromCache<Observable<T>> {
// 
//     public ObservableFromCache() {
//         this(null);
//     }
// 
//     public ObservableFromCache(@Nullable Observable<T> valueFromCache) {
//         super(valueFromCache);
//     }
// 
//     public static <T> ObservableFromCache<T> empty() {
//         return new ObservableFromCache<>();
//     }
// 
//     public static <T> ObservableFromCache<T> of(@Nullable Observable<T> valueFromCache) {
//         return new ObservableFromCache<>(valueFromCache);
//     }
// 
// }
// 
// Path: observable-cache-1/src/main/java/com/github/aleksandermielczarek/observablecache/SingleFromCache.java
// public final class SingleFromCache<T> extends ValueFromCache<Single<T>> {
// 
//     public SingleFromCache() {
//         this(null);
//     }
// 
//     public SingleFromCache(@Nullable Single<T> valueFromCache) {
//         super(valueFromCache);
//     }
// 
//     public static <T> SingleFromCache<T> empty() {
//         return new SingleFromCache<>();
//     }
// 
//     public static <T> SingleFromCache<T> of(@Nullable Single<T> valueFromCache) {
//         return new SingleFromCache<>(valueFromCache);
//     }
// 
// }


// Path: app/src/main/java/com/github/aleksandermielczarek/observablecacheexample/service/Cached1Service.java
import com.github.aleksandermielczarek.observablecache.CacheableCompletable;
import com.github.aleksandermielczarek.observablecache.CacheableObservable;
import com.github.aleksandermielczarek.observablecache.CacheableSingle;
import com.github.aleksandermielczarek.observablecache.CompletableFromCache;
import com.github.aleksandermielczarek.observablecache.ObservableFromCache;
import com.github.aleksandermielczarek.observablecache.SingleFromCache;
import com.github.aleksandermielczarek.observablecache.service.annotations.ObservableCacheService;

package com.github.aleksandermielczarek.observablecacheexample.service;


/**
 * Created by Aleksander Mielczarek on 30.10.2016.
 */
@ObservableCacheService
public interface Cached1Service {

    CacheableObservable<String> observable();

    ObservableFromCache<String> cachedObservable();

    CacheableSingle<String> single();

    SingleFromCache<String> cachedSingle();

    CacheableCompletable completable();

    CompletableFromCache cachedCompletable();

    CacheableObservable<String> observableError();

    ObservableFromCache<String> cachedObservableError();

    CacheableSingle<String> singleError();

    SingleFromCache<String> cachedSingleError();