@Incubating interface AttributesSchema
An attributes schema stores information about Attribute and how they can be matched together.
Since
3.3
abstract fun <T : Any> attribute(attribute: Attribute<T>): AttributeMatchingStrategy<T>
Declares a new attribute in the schema and configures it with the default strategy. If the attribute was already declared it will simply return the existing strategy. abstract fun <T : Any> attribute(attribute: Attribute<T>, configureAction: Action<in AttributeMatchingStrategy<T>>): AttributeMatchingStrategy<T>
Configures the matching strategy for an attribute. The first call to this method for a specific attribute will create a new matching strategy, whereas subsequent calls will configure the existing one. |
|
abstract fun getAttributes(): MutableSet<Attribute<*>>
Returns the set of attributes known to this schema. |
|
abstract fun <T : Any> getMatchingStrategy(attribute: Attribute<T>): AttributeMatchingStrategy<T>
Returns the matching strategy for a given attribute. |
|
abstract fun hasAttribute(key: Attribute<*>): Boolean
Returns true when this schema contains the given attribute. |