public abstract class AttributeAccessorSupport extends ObjectSE implements AttributeAccessor, SerializableSE
AttributeAccessors
のサポートクラス。サブクラスによって拡張されます。Serializable
SE(サブクラスとすべての属性値が Serializable
SE の場合)。
コンストラクターと説明 |
---|
AttributeAccessorSupport() |
修飾子と型 | メソッドと説明 |
---|---|
StringSE[] | attributeNames() すべての属性の名前を返します。 |
protected void | copyAttributesFrom(AttributeAccessor source) 提供された AttributeAccessor からこのアクセサーに属性をコピーします。 |
boolean | equals(ObjectSE other) |
ObjectSE | getAttribute(StringSE name) name で識別される属性の値を取得します。 |
boolean | hasAttribute(StringSE name) name で識別される属性が存在する場合は、true を返します。 |
int | hashCode() |
ObjectSE | removeAttribute(StringSE name) name で識別される属性を削除し、その値を返します。 |
void | setAttribute(StringSE name, ObjectSE value) name で定義された属性を、指定された value に設定します。 |
cloneSE, finalizeSE, getClassSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
public void setAttribute(StringSE name, @Nullable ObjectSE value)
AttributeAccessor
name
で定義された属性を、指定された value
に設定します。value
が null
の場合、属性は removed
です。一般に、ユーザーは、クラスまたはパッケージ名を接頭辞として使用するなど、完全修飾名を使用して、他のメタデータ属性との重複を防ぐように注意する必要があります。
AttributeAccessor
の setAttribute
name
- 一意の属性キー value
- 添付する属性値 @Nullable public ObjectSE getAttribute(StringSE name)
AttributeAccessor
name
で識別される属性の値を取得します。属性が存在しない場合は null
を返します。AttributeAccessor
の getAttribute
name
- 一意の属性キー @Nullable public ObjectSE removeAttribute(StringSE name)
AttributeAccessor
name
で識別される属性を削除し、その値を返します。name
の属性が見つからない場合は、null
を返します。AttributeAccessor
の removeAttribute
name
- 一意の属性キー public boolean hasAttribute(StringSE name)
AttributeAccessor
name
で識別される属性が存在する場合は、true
を返します。それ以外の場合は false
を返します。AttributeAccessor
の hasAttribute
name
- 一意の属性キー public StringSE[] attributeNames()
AttributeAccessor
AttributeAccessor
の attributeNames
protected void copyAttributesFrom(AttributeAccessor source)
source
- コピー元の AttributeAccessorpublic int hashCode()
ObjectSE
の hashCodeSE