Lines Matching refs:or
10 * Unless required by applicable law or agreed to in writing, software
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
33 * instance of this type either contains a non-null reference, or contains nothing (in
55 * <p>A common alternative to using this class is to find or create a suitable
59 * <p>This class is not intended as a direct analogue of any existing "option" or "maybe"
106 * absent, use {@link #or(Object)} or {@link #orNull} instead.
118 public abstract T or(T defaultValue);
124 public abstract Optional<T> or(Optional<? extends T> secondChoice);
132 public abstract T or(Supplier<? extends T> supplier);
151 * the contained references are {@linkplain Object#equals equal} to each other or both
213 @Override public T or(T defaultValue) {
214 checkNotNull(defaultValue, "use orNull() instead of or(null)");
218 @Override public Optional<T> or(Optional<? extends T> secondChoice) {
223 @Override public T or(Supplier<? extends T> supplier) {
266 @Override public Object or(Object defaultValue) {
267 return checkNotNull(defaultValue, "use orNull() instead of or(null)");
271 @Override public Optional<Object> or(Optional<?> secondChoice) {
275 @Override public Object or(Supplier<?> supplier) {