public class ConcurrentModel extends ConcurrentHashMapSE<StringSE,ObjectSE> implements Model
ConcurrentHashMap
SE に基づく Model
インターフェースの実装。Spring WebFlux により、通常 Model
インターフェースの宣言を介してハンドラーメソッドに公開されます。通常、ユーザーコード内で作成する必要はありません。必要に応じて、ハンドラーメソッドは、事前に決定されたモデルに対して通常の java.util.Map
、おそらく java.util.ConcurrentMap
を返すことができます。
ConcurrentHashMap.KeySetViewSE<KSE, VSE>
AbstractMap.SimpleEntrySE<KSE, VSE>, AbstractMap.SimpleImmutableEntrySE<KSE, VSE>
Map.EntrySE<KSE, VSE>
コンストラクターと説明 |
---|
ConcurrentModel() 新しい空の ConcurrentModel を作成します。 |
ConcurrentModel(ObjectSE attributeValue) 指定された属性を含む新しい ModelMap を作成します。 |
ConcurrentModel(StringSE attributeName, ObjectSE attributeValue) 指定された名前で指定された属性を含む新しい ModelMap を構築します。 |
修飾子と型 | メソッドと説明 |
---|---|
ConcurrentModel | addAllAttributes(CollectionSE<?> attributeValues) 各要素の属性名の生成を使用して、提供された Collection のすべての属性をこの Map にコピーします。 |
ConcurrentModel | addAllAttributes(MapSE<StringSE,?> attributes) 指定された Map のすべての属性をこの Map にコピーします。 |
ConcurrentModel | addAttribute(ObjectSE attributeValue) generated name を使用して、この Map に提供された属性を追加します。 |
ConcurrentModel | addAttribute(StringSE attributeName, ObjectSE attributeValue) 指定された名前に指定された属性を追加します。 |
MapSE<StringSE, ObjectSE> | asMap() モデル属性の現在のセットをマップとして返します。 |
boolean | containsAttribute(StringSE attributeName) このモデルには、指定された名前の属性が含まれているか判定します。 |
ObjectSE | getAttribute(StringSE attributeName) 指定された名前の属性値があれば、それを返します。 |
ConcurrentModel | mergeAttributes(MapSE<StringSE,?> attributes) 指定された Map のすべての属性をこの Map にコピーします。同じ名前の既存のオブジェクトが優先されます(つまり |
ObjectSE | put(StringSE key, ObjectSE value) |
void | putAll(MapSE<? extends StringSE,?> map) |
clearSE, computeSE, computeIfAbsentSE, computeIfPresentSE, containsSE, containsKeySE, containsValueSE, elementsSE, entrySetSE, equalsSE, forEachSE, forEachSE, forEachSE, forEachEntrySE, forEachEntrySE, forEachKeySE, forEachKeySE, forEachValueSE, forEachValueSE, getSE, getOrDefaultSE, hashCodeSE, isEmptySE, keysSE, keySetSE, keySetSE, mappingCountSE, mergeSE, newKeySetSE, newKeySetSE, putIfAbsentSE, reduceSE, reduceEntriesSE, reduceEntriesSE, reduceEntriesToDoubleSE, reduceEntriesToIntSE, reduceEntriesToLongSE, reduceKeysSE, reduceKeysSE, reduceKeysToDoubleSE, reduceKeysToIntSE, reduceKeysToLongSE, reduceToDoubleSE, reduceToIntSE, reduceToLongSE, reduceValuesSE, reduceValuesSE, reduceValuesToDoubleSE, reduceValuesToIntSE, reduceValuesToLongSE, removeSE, removeSE, replaceSE, replaceSE, replaceAllSE, searchSE, searchEntriesSE, searchKeysSE, searchValuesSE, sizeSE, toStringSE, valuesSE
cloneSE
finalizeSE, getClassSE, notifySE, notifyAllSE, waitSE, waitSE, waitSE
public ConcurrentModel()
ConcurrentModel
を作成します。public ConcurrentModel(StringSE attributeName, ObjectSE attributeValue)
ModelMap
を構築します。public ConcurrentModel(ObjectSE attributeValue)
ModelMap
を作成します。属性名の生成を使用して、提供されたモデルオブジェクトのキーを生成します。addAttribute(Object)
public ConcurrentModel addAttribute(StringSE attributeName, @Nullable ObjectSE attributeValue)
Model
の addAttribute
attributeName
- モデル属性の名前 (非 null
)attributeValue
- モデル属性値 (null
の場合は無視され、既存のエントリがあれば削除されます)public ConcurrentModel addAttribute(ObjectSE attributeValue)
generated name
を使用して、この Map
に提供された属性を追加します。 メモ: 真の規則名を正しく判別できないため、このメソッドを使用する場合、空の Collections
SE はモデルに追加されません。ビューコードは、JSTL タグによってすでに行われているように、空のコレクションではなく null
をチェックする必要があります。
Model
の addAttribute
attributeValue
- モデル属性値 (非 null
)public ConcurrentModel addAllAttributes(@Nullable CollectionSE<?> attributeValues)
Collection
のすべての属性をこの Map
にコピーします。Model
の addAllAttributes
addAttribute(Object)
public ConcurrentModel addAllAttributes(@Nullable MapSE<StringSE,?> attributes)
Map
のすべての属性をこの Map
にコピーします。Model
の addAllAttributes
addAttribute(String, Object)
public ConcurrentModel mergeAttributes(@Nullable MapSE<StringSE,?> attributes)
Map
のすべての属性をこの Map
にコピーします。同じ名前の既存のオブジェクトが優先されます(つまり、置き換えられません)。Model
の mergeAttributes
public boolean containsAttribute(StringSE attributeName)
Model
の containsAttribute
attributeName
- モデル属性の名前 (非 null
)@Nullable public ObjectSE getAttribute(StringSE attributeName)
Model
Model
の getAttribute
attributeName
- モデル属性の名前 (非 null
)null