gradle
8.5

# Attribute

open class Attribute<T> : Named(source)

An attribute is a named entity with a type. It is used in conjunction with a AttributeContainer to provide a type safe container for attributes. This class isn't intended to store the value of an attribute, but only represent the identity of the attribute. It means that an attribute must be immutable and can potentially be pooled. Attributes can be created using the factory method.

#### Parameters

<T>

the type of the named attribute

## Properties

name
Link copied to clipboard
val name: String
type
Link copied to clipboard
val type: Class<T>

## Functions

equals
Link copied to clipboard
open fun equals(o: Any): Boolean
getName
Link copied to clipboard
abstract fun getName(): String
hashCode
Link copied to clipboard
open fun hashCode(): Int
of
Link copied to clipboard
open fun <T> of(type: Class<T>): Attribute<T>
Creates a new attribute of the given type, inferring the name of the attribute from the simple type name.
open fun <T> of(name: String, type: Class<T>): Attribute<T>
Creates a new attribute of the given name with the given type.
toString
Link copied to clipboard
open fun toString(): String