@Test public void getCached_WhenEmptyStore_ReturnsEmptyList() { memoryStoreCore.getCached() .test() .assertValue(emptyList()); }
@NonNull @Override public Maybe<U> getCached(@NonNull final T id) { checkNotNull(id); final U value = cache.get(getHashCodeForId(id)); return value == null ? Maybe.empty() : Maybe.just(value); }
MemoryStoreCore implements StoreCoreInterface<T, U> { @NonNull @Override public Maybe<U> getCached(@NonNull final T id) { checkNotNull(id); final U value = cache.get(getHashCodeForId(id)); return value == null ? Maybe.empty() : Maybe.just(value); } }
MemoryStoreCore implements StoreCoreInterface<T, U> { @NonNull @Override public Maybe<U> getCached(@NonNull final T id) { checkNotNull(id); final U value = cache.get(getHashCodeForId(id)); return value == null ? Maybe.empty() : Maybe.just(value); } MemoryStoreCore();  MemoryStoreCore(@NonNull final BiFunction<U, U, U> putMergeFunction); }
MemoryStoreCore implements StoreCoreInterface<T, U> { @NonNull @Override public Maybe<U> getCached(@NonNull final T id) { checkNotNull(id); final U value = cache.get(getHashCodeForId(id)); return value == null ? Maybe.empty() : Maybe.just(value); } MemoryStoreCore();  MemoryStoreCore(@NonNull final BiFunction<U, U, U> putMergeFunction); @NonNull @Override Maybe<U> getCached(@NonNull final T id); @NonNull @Override Single<List<U>> getCached(); @NonNull @Override Observable<U> getStream(@NonNull final T id); @NonNull @Override Observable<U> getStream(); @NonNull @Override Single<Boolean> put(@NonNull final T id, @NonNull final U item); @NonNull @Override Single<Boolean> delete(@NonNull final T id); }
MemoryStoreCore implements StoreCoreInterface<T, U> { @NonNull @Override public Maybe<U> getCached(@NonNull final T id) { checkNotNull(id); final U value = cache.get(getHashCodeForId(id)); return value == null ? Maybe.empty() : Maybe.just(value); } MemoryStoreCore();  MemoryStoreCore(@NonNull final BiFunction<U, U, U> putMergeFunction); @NonNull @Override Maybe<U> getCached(@NonNull final T id); @NonNull @Override Single<List<U>> getCached(); @NonNull @Override Observable<U> getStream(@NonNull final T id); @NonNull @Override Observable<U> getStream(); @NonNull @Override Single<Boolean> put(@NonNull final T id, @NonNull final U item); @NonNull @Override Single<Boolean> delete(@NonNull final T id);  }