diff --git a/observable-cache-1/src/main/java/com/github/aleksandermielczarek/observablecache/CompletableFromCache.java b/observable-cache-1/src/main/java/com/github/aleksandermielczarek/observablecache/CompletableFromCache.java index ad7d9ec..b9c49bb 100644 --- a/observable-cache-1/src/main/java/com/github/aleksandermielczarek/observablecache/CompletableFromCache.java +++ b/observable-cache-1/src/main/java/com/github/aleksandermielczarek/observablecache/CompletableFromCache.java @@ -11,12 +11,16 @@ */ public final class CompletableFromCache extends ValueFromCache { - CompletableFromCache(@Nullable Completable valueFromCache) { + public CompletableFromCache() { + this(null); + } + + public CompletableFromCache(@Nullable Completable valueFromCache) { super(valueFromCache); } public static CompletableFromCache empty() { - return new CompletableFromCache(null); + return new CompletableFromCache(); } public static CompletableFromCache of(@Nullable Completable valueFromCache) { diff --git a/observable-cache-1/src/main/java/com/github/aleksandermielczarek/observablecache/ObservableFromCache.java b/observable-cache-1/src/main/java/com/github/aleksandermielczarek/observablecache/ObservableFromCache.java index 8e6a156..295ec5a 100644 --- a/observable-cache-1/src/main/java/com/github/aleksandermielczarek/observablecache/ObservableFromCache.java +++ b/observable-cache-1/src/main/java/com/github/aleksandermielczarek/observablecache/ObservableFromCache.java @@ -11,12 +11,16 @@ */ public final class ObservableFromCache extends ValueFromCache> { - ObservableFromCache(@Nullable Observable valueFromCache) { + public ObservableFromCache() { + this(null); + } + + public ObservableFromCache(@Nullable Observable valueFromCache) { super(valueFromCache); } public static ObservableFromCache empty() { - return new ObservableFromCache<>(null); + return new ObservableFromCache<>(); } public static ObservableFromCache of(@Nullable Observable valueFromCache) { diff --git a/observable-cache-1/src/main/java/com/github/aleksandermielczarek/observablecache/SingleFromCache.java b/observable-cache-1/src/main/java/com/github/aleksandermielczarek/observablecache/SingleFromCache.java index 596ede0..73c3599 100644 --- a/observable-cache-1/src/main/java/com/github/aleksandermielczarek/observablecache/SingleFromCache.java +++ b/observable-cache-1/src/main/java/com/github/aleksandermielczarek/observablecache/SingleFromCache.java @@ -11,12 +11,16 @@ */ public final class SingleFromCache extends ValueFromCache> { - SingleFromCache(@Nullable Single valueFromCache) { + public SingleFromCache() { + this(null); + } + + public SingleFromCache(@Nullable Single valueFromCache) { super(valueFromCache); } public static SingleFromCache empty() { - return new SingleFromCache<>(null); + return new SingleFromCache<>(); } public static SingleFromCache of(@Nullable Single valueFromCache) { diff --git a/observable-cache-2/src/main/java/com/github/aleksandermielczarek/observablecache2/CompletableFromCache.java b/observable-cache-2/src/main/java/com/github/aleksandermielczarek/observablecache2/CompletableFromCache.java index 352bb1b..08d63f5 100644 --- a/observable-cache-2/src/main/java/com/github/aleksandermielczarek/observablecache2/CompletableFromCache.java +++ b/observable-cache-2/src/main/java/com/github/aleksandermielczarek/observablecache2/CompletableFromCache.java @@ -12,12 +12,16 @@ public final class CompletableFromCache extends ValueFromCache { - CompletableFromCache(@Nullable Completable valueFromCache) { + public CompletableFromCache() { + this(null); + } + + public CompletableFromCache(@Nullable Completable valueFromCache) { super(valueFromCache); } public static CompletableFromCache empty() { - return new CompletableFromCache(null); + return new CompletableFromCache(); } public static CompletableFromCache of(@Nullable Completable valueFromCache) { diff --git a/observable-cache-2/src/main/java/com/github/aleksandermielczarek/observablecache2/FlowableFromCache.java b/observable-cache-2/src/main/java/com/github/aleksandermielczarek/observablecache2/FlowableFromCache.java index d5a2f0d..3774d55 100644 --- a/observable-cache-2/src/main/java/com/github/aleksandermielczarek/observablecache2/FlowableFromCache.java +++ b/observable-cache-2/src/main/java/com/github/aleksandermielczarek/observablecache2/FlowableFromCache.java @@ -12,12 +12,16 @@ public final class FlowableFromCache extends ValueFromCache> { - FlowableFromCache(@Nullable Flowable valueFromCache) { + public FlowableFromCache() { + this(null); + } + + public FlowableFromCache(@Nullable Flowable valueFromCache) { super(valueFromCache); } public static FlowableFromCache empty() { - return new FlowableFromCache<>(null); + return new FlowableFromCache<>(); } public static FlowableFromCache of(@Nullable Flowable valueFromCache) { diff --git a/observable-cache-2/src/main/java/com/github/aleksandermielczarek/observablecache2/MaybeFromCache.java b/observable-cache-2/src/main/java/com/github/aleksandermielczarek/observablecache2/MaybeFromCache.java index 97afa94..fa92a74 100644 --- a/observable-cache-2/src/main/java/com/github/aleksandermielczarek/observablecache2/MaybeFromCache.java +++ b/observable-cache-2/src/main/java/com/github/aleksandermielczarek/observablecache2/MaybeFromCache.java @@ -12,12 +12,16 @@ public final class MaybeFromCache extends ValueFromCache> { - MaybeFromCache(@Nullable Maybe valueFromCache) { + public MaybeFromCache() { + this(null); + } + + public MaybeFromCache(@Nullable Maybe valueFromCache) { super(valueFromCache); } public static MaybeFromCache empty() { - return new MaybeFromCache<>(null); + return new MaybeFromCache<>(); } public static MaybeFromCache of(@Nullable Maybe valueFromCache) { diff --git a/observable-cache-2/src/main/java/com/github/aleksandermielczarek/observablecache2/ObservableFromCache.java b/observable-cache-2/src/main/java/com/github/aleksandermielczarek/observablecache2/ObservableFromCache.java index e3304cc..9943c52 100644 --- a/observable-cache-2/src/main/java/com/github/aleksandermielczarek/observablecache2/ObservableFromCache.java +++ b/observable-cache-2/src/main/java/com/github/aleksandermielczarek/observablecache2/ObservableFromCache.java @@ -12,12 +12,16 @@ public final class ObservableFromCache extends ValueFromCache> { - ObservableFromCache(@Nullable Observable valueFromCache) { + public ObservableFromCache() { + this(null); + } + + public ObservableFromCache(@Nullable Observable valueFromCache) { super(valueFromCache); } public static ObservableFromCache empty() { - return new ObservableFromCache<>(null); + return new ObservableFromCache<>(); } public static ObservableFromCache of(@Nullable Observable valueFromCache) { diff --git a/observable-cache-2/src/main/java/com/github/aleksandermielczarek/observablecache2/SingleFromCache.java b/observable-cache-2/src/main/java/com/github/aleksandermielczarek/observablecache2/SingleFromCache.java index cb7cf4b..5d78b91 100644 --- a/observable-cache-2/src/main/java/com/github/aleksandermielczarek/observablecache2/SingleFromCache.java +++ b/observable-cache-2/src/main/java/com/github/aleksandermielczarek/observablecache2/SingleFromCache.java @@ -12,12 +12,16 @@ public final class SingleFromCache extends ValueFromCache> { - SingleFromCache(@Nullable Single valueFromCache) { + public SingleFromCache() { + this(null); + } + + public SingleFromCache(@Nullable Single valueFromCache) { super(valueFromCache); } public static SingleFromCache empty() { - return new SingleFromCache<>(null); + return new SingleFromCache<>(); } public static SingleFromCache of(@Nullable Single valueFromCache) { diff --git a/observable-cache-api/src/main/java/com/github/aleksandermielczarek/observablecache/api/ValueFromCache.java b/observable-cache-api/src/main/java/com/github/aleksandermielczarek/observablecache/api/ValueFromCache.java index 33a69af..8267dd5 100644 --- a/observable-cache-api/src/main/java/com/github/aleksandermielczarek/observablecache/api/ValueFromCache.java +++ b/observable-cache-api/src/main/java/com/github/aleksandermielczarek/observablecache/api/ValueFromCache.java @@ -11,7 +11,7 @@ public abstract class ValueFromCache { @Nullable private final T valueFromCache; - protected ValueFromCache(@Nullable T valueFromCache) { + public ValueFromCache(@Nullable T valueFromCache) { this.valueFromCache = valueFromCache; }