@Immutable public static final class u.OptionalChar extends Object implements Comparable<u.OptionalChar>, Immutable
public static u.OptionalChar empty()
public static u.OptionalChar of(char value)
value - public static u.OptionalChar ofNullable(Character val)
val - public char get()
throws NoSuchElementException
NoSuchElementException - the no such element exceptionpublic boolean isPresent()
public boolean isEmpty()
public <E extends Exception> u.OptionalChar ifPresent(Throwables.CharConsumer<E> action) throws E extends Exception
E - action - E - the eE extends Exceptionpublic <E extends Exception,E2 extends Exception> u.OptionalChar ifPresentOrElse(Throwables.CharConsumer<E> action, Throwables.Runnable<E2> emptyAction) throws E extends Exception, E2 extends Exception
E - E2 - action - emptyAction - E - the eE2 - the e2E extends Exceptionpublic <E extends Exception> u.OptionalChar filter(Throwables.CharPredicate<E> predicate) throws E extends Exception
E - predicate - E - the eE extends Exceptionpublic <E extends Exception> u.OptionalChar map(Throwables.CharUnaryOperator<E> mapper) throws E extends Exception
E - mapper - E - the eE extends Exceptionpublic <E extends Exception> u.OptionalInt mapToInt(Throwables.ToIntFunction<Character,E> mapper) throws E extends Exception
E - mapper - E - the eE extends Exceptionpublic <T,E extends Exception> u.Nullable<T> mapToObj(Throwables.CharFunction<T,E> mapper) throws E extends Exception
T - E - mapper - E - the eE extends Exceptionpublic <T,E extends Exception> u.Optional<T> mapToNonNull(Throwables.CharFunction<T,E> mapper) throws E extends Exception
E extends Exceptionpublic <E extends Exception> u.OptionalChar flatMap(Throwables.CharFunction<u.OptionalChar,E> mapper) throws E extends Exception
E - mapper - E - the eE extends Exceptionpublic <E extends Exception> u.OptionalChar or(Throwables.Supplier<u.OptionalChar,E> supplier) throws E extends Exception
E - supplier - E - the eE extends Exceptionpublic char orZero()
public char orElseThrow()
throws NoSuchElementException
NoSuchElementException - the no such element exceptionpublic char orElse(char other)
other - public <E extends Exception> char orElseGet(Throwables.CharSupplier<E> other) throws E extends Exception
E - other - E - the eE extends Exceptionpublic <X extends Throwable> char orElseThrow(Supplier<? extends X> exceptionSupplier) throws X extends Throwable
X - exceptionSupplier - X - the xX extends Throwablepublic ImmutableList<Character> toImmutableList()
public ImmutableSet<Character> toImmutableSet()
public u.Optional<Character> boxed()
public int compareTo(u.OptionalChar optional)
compareTo in interface Comparable<u.OptionalChar>optional - public boolean equals(Object obj)
Copyright © 2021. All rights reserved.