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