public final class RequestMethodsRequestCondition extends AbstractRequestCondition<RequestMethodsRequestCondition>
RequestMethods
のセットに対するリクエストと一致する論理和('| |')リクエスト条件。コンストラクターと説明 |
---|
RequestMethodsRequestCondition(RequestMethod... requestMethods) 指定されたリクエストメソッドで新しいインスタンスを作成します。 |
修飾子と型 | メソッドと説明 |
---|---|
RequestMethodsRequestCondition | combine(RequestMethodsRequestCondition other) "this" からの HTTP リクエストメソッドと「その他の」インスタンスの和集合を持つ新しいインスタンスを返します。 |
int | compareTo(RequestMethodsRequestCondition other, ServerWebExchange exchange) 戻り値: 2 つの条件に含まれる HTTP リクエストメソッドの数 Less が 0 よりも多い場合は 0。"this" インスタンスに HTTP リクエストメソッドがあるが「その他」が 0 より大きい場合「その他」は HTTP リクエストメソッドを持つが "this" はない |
protected CollectionSE<RequestMethod> | getContent() リクエスト条件を構成する個別のアイテムを返します。 |
RequestMethodsRequestCondition | getMatchingCondition(ServerWebExchange exchange) HTTP リクエストメソッドのいずれかが指定されたリクエストと一致するかどうかを確認し、一致する HTTP リクエストメソッドのみを含むインスタンスを返します。 |
SetSE<RequestMethod> | getMethods() この条件に含まれるすべての RequestMethods を返します。 |
protected StringSE | getToStringInfix() コンテンツの個別のアイテムを出力するときに使用する表記。 |
equals, hashCode, isEmpty, toString
cloneSE, finalizeSE, getClassSE, notifySE, notifyAllSE, waitSE, waitSE, waitSE
public RequestMethodsRequestCondition(RequestMethod... requestMethods)
requestMethods
- 0 個以上の HTTP リクエストメソッド。0 の場合、条件はすべてのリクエストに一致します public SetSE<RequestMethod> getMethods()
RequestMethods
を返します。protected CollectionSE<RequestMethod> getContent()
AbstractRequestCondition
たとえば、URL パターン、HTTP リクエストメソッド、パラメーター式など。
AbstractRequestCondition<RequestMethodsRequestCondition>
の getContent
null
)protected StringSE getToStringInfix()
AbstractRequestCondition
たとえば、URL パターンの " || "
または param 式の " && "
。
public RequestMethodsRequestCondition combine(RequestMethodsRequestCondition other)
other
- 組み合わせる条件。@Nullable public RequestMethodsRequestCondition getMatchingCondition(ServerWebExchange exchange)
exchange
- 現在の交換 null
。public int compareTo(RequestMethodsRequestCondition other, ServerWebExchange exchange)
両方のインスタンスが getMatchingCondition(ServerWebExchange)
を介して取得されていると想定されているため、各インスタンスには一致する HTTP リクエストメソッドのみが含まれるか、そうでなければ空です。