| 修飾子と型 | メソッドと説明 |
|---|---|
boolean | equals(ObjectSE obj) |
T | get() バインドされたオブジェクトを返すか、値がバインドされていない場合は NoSuchElementExceptionSE をスローします。 |
int | hashCode() |
void | ifBound(ConsumerSE<? super T> consumer) バインドされた値で指定されたコンシューマーを呼び出すか、値がバインドされていない場合は何もしません。 |
boolean | isBound() 結果がバインドされている場合は true を返します。 |
<U> BindResult<U> | map(FunctionSE<? super T,? extends U> mapper) 提供されたマッピング関数をバインドされた値に適用するか、値がバインドされていない場合は更新されたバインドされていない結果を返します。 |
T | orElse(T other) バインドされたオブジェクトを返します。値がバインドされていない場合は other を返します。 |
T | orElseCreate(ClassSE<? extends T> type) 使用すべきではありません。 |
T | orElseGet(SupplierSE<? extends T> other) バインドされたオブジェクト、または値がバインドされていない場合は other を呼び出した結果を返します。 |
<X extends ThrowableSE> | orElseThrow(SupplierSE<? extends X> exceptionSupplier) バインドされたオブジェクトを返すか、値がバインドされていない場合は、提供されたサプライヤーによって作成される例外をスローします。 |
cloneSE, finalizeSE, getClassSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSEpublic T get() throws NoSuchElementExceptionSE
NoSuchElementExceptionSE をスローします。null ではない)NoSuchElementExceptionSE - 値がバインドされていない場合 isBound()public boolean isBound()
true を返します。public void ifBound(ConsumerSE<? super T> consumer)
consumer - 値がバインドされている場合に実行するブロック public <U> BindResult<U> map(FunctionSE<? super T,? extends U> mapper)
U - マッピング関数の結果の型 mapper - バインドされた値に適用するマッピング関数。値がバインドされていない場合、マッパーは呼び出されません。BindResult の値にマッピング関数を適用した結果を説明する BindResult public T orElse(T other)
other を返します。other - バインドされた値がない場合に返される値 (null の場合があります)otherpublic T orElseGet(SupplierSE<? extends T> other)
other を呼び出した結果を返します。other - バインドされた値がない場合に返される値の SupplierSEother@DeprecatedSE public T orElseCreate(ClassSE<? extends T> type)
Binder.bindOrCreate(java.lang.String, java.lang.Class<T>) に移行 type - 値がバインドされていない場合に作成する型 type の新しいインスタンス public <X extends ThrowableSE> T orElseThrow(SupplierSE<? extends X> exceptionSupplier) throws X extends ThrowableSE
X - スローされる例外の型 exceptionSupplier - スローされる例外を返すサプライヤー X - 値が存在しない場合 X extends ThrowableSEpublic int hashCode()
ObjectSE の hashCodeSE Copyright © 2019 Pivotal Software, Inc.. All rights reserved.