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