Package org.postgresql.pljava.internal
Class Checked.OptionalChar
- java.lang.Object
-
- org.postgresql.pljava.internal.Checked.OptionalBase
-
- org.postgresql.pljava.internal.Checked.OptionalChar
-
public static class Checked.OptionalChar extends Checked.OptionalBase
A container object which may or may not contain achar
value.
-
-
Field Summary
Fields Modifier and Type Field Description static Checked.OptionalChar
EMPTY
An emptyOptionalChar
, for convenience; not to be used in identity-sensitive operations.
-
Method Summary
Modifier and Type Method Description char
getAsChar()
<E extends Throwable>
voidifPresent(Checked.CharConsumer<? extends E> action)
<E extends Throwable>
voidifPresentOrElse(Checked.CharConsumer<? extends E> action, Checked.Runnable<? extends E> emptyAction)
static Checked.OptionalChar
of(char value)
char
orElse(char other)
<E extends Throwable>
charorElseGet(Checked.CharSupplier<? extends E> supplier)
<E extends Throwable>
charorElseThrow(Checked.Supplier<? extends E,? extends E> exceptionSupplier)
-
Methods inherited from class org.postgresql.pljava.internal.Checked.OptionalBase
equals, hashCode, isPresent, ofNullable, ofNullable, ofNullable, ofNullable, ofNullable, ofNullable, ofNullable, ofNullable, toString
-
-
-
-
Field Detail
-
EMPTY
public static final Checked.OptionalChar EMPTY
An emptyOptionalChar
, for convenience; not to be used in identity-sensitive operations.
-
-
Method Detail
-
of
public static Checked.OptionalChar of(char value)
-
getAsChar
public char getAsChar()
-
ifPresent
public <E extends Throwable> void ifPresent(Checked.CharConsumer<? extends E> action) throws E extends Throwable
- Throws:
E extends Throwable
-
ifPresentOrElse
public <E extends Throwable> void ifPresentOrElse(Checked.CharConsumer<? extends E> action, Checked.Runnable<? extends E> emptyAction) throws E extends Throwable
- Throws:
E extends Throwable
-
orElse
public char orElse(char other)
-
orElseGet
public <E extends Throwable> char orElseGet(Checked.CharSupplier<? extends E> supplier) throws E extends Throwable
- Throws:
E extends Throwable
-
orElseThrow
public <E extends Throwable> char orElseThrow(Checked.Supplier<? extends E,? extends E> exceptionSupplier) throws E extends Throwable
- Throws:
E extends Throwable
-
-