/** * If {@code nullableReference} is non-null, returns an {@code Optional} instance containing that * reference; otherwise returns {@link Optional#absent}. * <p> * <p><b>Comparison to {@code java.util.Optional}:</b> this method is equivalent to Java 8's * {@code Optional.ofNullable}. */ static <T> Optional<T> fromNullable(@Nullable T nullableReference) { return (nullableReference == null) ? Optional.<T>absent() : new Present<T>(nullableReference); }
/** * If {@code nullableReference} is non-null, returns an {@code Optional} instance containing that * reference; otherwise returns {@link Optional#absent}. * <p> * <p><b>Comparison to {@code java.util.Optional}:</b> this method is equivalent to Java 8's * {@code Optional.ofNullable}. */ static <T> Optional<T> fromNullable(@Nullable T nullableReference) { return (nullableReference == null) ? Optional.<T>absent() : new Present<T>(nullableReference); }
@Override <V> Optional<V> transform(Function<? super T, V> function) { checkNotNull(function); return Optional.absent(); }
@Override <V> Optional<V> transform(Function<? super T, V> function) { checkNotNull(function); return Optional.absent(); }
public Optional<TapeMode> toOptional() { if (this.equals(TapeMode.UNDEFINED)) { return Optional.absent(); } else { return Optional.of(this); } } }
public Optional<TapeMode> toOptional() { if (this.equals(TapeMode.UNDEFINED)) { return Optional.absent(); } else { return Optional.of(this); } } }
public void start(String tapeName, TapeMode mode) { start(tapeName, mode.toOptional(), Optional.<MatchRule>absent()); }
public void start(String tapeName, TapeMode mode) { start(tapeName, mode.toOptional(), Optional.<MatchRule>absent()); }