Package org.postgresql.pljava.internal
Class Checked.OptionalByte
java.lang.Object
org.postgresql.pljava.internal.Checked.OptionalBase
org.postgresql.pljava.internal.Checked.OptionalByte
A container object which may or may not contain a
byte
value.-
Field Summary
Modifier and TypeFieldDescriptionstatic final Checked.OptionalByte
An emptyOptionalByte
, for convenience; not to be used in identity-sensitive operations. -
Method Summary
Modifier and TypeMethodDescriptionbyte
<E extends Throwable>
voidifPresent
(Checked.ByteConsumer<? extends E> action) <E extends Throwable>
voidifPresentOrElse
(Checked.ByteConsumer<? extends E> action, Checked.Runnable<? extends E> emptyAction) static Checked.OptionalByte
of
(byte value) byte
orElse
(byte other) <E extends Throwable>
byteorElseGet
(Checked.ByteSupplier<? extends E> supplier) <E extends Throwable>
byteorElseThrow
(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 Details
-
EMPTY
An emptyOptionalByte
, for convenience; not to be used in identity-sensitive operations.
-
-
Method Details
-
of
-
getAsByte
public byte getAsByte() -
ifPresent
- Throws:
E
-
ifPresentOrElse
public <E extends Throwable> void ifPresentOrElse(Checked.ByteConsumer<? extends E> action, Checked.Runnable<? extends E> emptyAction) throws E - Throws:
E
-
orElse
public byte orElse(byte other) -
orElseGet
- Throws:
E
-
orElseThrow
public <E extends Throwable> byte orElseThrow(Checked.Supplier<? extends E, ? extends E> exceptionSupplier) throws E- Throws:
E
-