File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
library/src/main/java/com/anotherdev/android/robospice Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -23,14 +23,17 @@ public static <T> Optional<T> from(@Nullable T nullableReference) {
2323
2424 public abstract T or (T defaultValue );
2525
26+ public abstract Optional <T > or (Optional <? extends T > secondChoice );
27+
2628 @ Nullable
2729 public abstract T orNull ();
2830
29- protected T checkNotNull (T reference ) {
31+
32+ protected static <R > R checkNotNull (R reference ) {
3033 return checkNotNull (reference , null );
3134 }
3235
33- protected T checkNotNull (T reference , @ Nullable CharSequence errorMessage ) {
36+ protected static < R > R checkNotNull (R reference , @ Nullable CharSequence errorMessage ) {
3437 if (reference == null ) {
3538 if (errorMessage == null ) {
3639 throw new NullPointerException ();
You can’t perform that action at this time.
0 commit comments