Attribute

class Attribute<T : Any>

一个属性。

此类型通常使用在事件处理中的上下文使用。 Attribute 拥有一个 属性名, 而不会真实保留 T 类型信息。

AttributeAttribute.hashcode 将会直接与 name 一致,因此可以直接将 Attribute 作为一个 Map 的 Key, 并且在进行 Attribute.equals 比较的时候,会对 name 进行比较。

Note: 由于 Attribute 不保留任何类型信息,因此在使用 Attribute 进行类型转化的时候均为非检转化。你需要更严谨的使用此类型以避免出现类型转化异常。

See also

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String

Properties

Link copied to clipboard

属性的名称