public interface AttributesSchema
attributes and how they
can be matched together.| Modifier and Type | Method | Description |
|---|---|---|
<T> AttributeMatchingStrategy<T> |
attribute(Attribute<T> attribute) |
Declares a new attribute in the schema and configures it with the default strategy.
|
<T> AttributeMatchingStrategy<T> |
attribute(Attribute<T> attribute,
Action<? super AttributeMatchingStrategy<T>> configureAction) |
Configures the matching strategy for an attribute.
|
void |
attributeDisambiguationPrecedence(Attribute<?>... attributes) |
Adds attributes to the precedence order.
|
Collection<Attribute<?>> |
getAttributeDisambiguationPrecedence() |
Returns the order that attributes should be considered when resolving ambiguity.
|
Set<Attribute<?>> |
getAttributes() |
Returns the set of attributes known to this schema.
|
<T> AttributeMatchingStrategy<T> |
getMatchingStrategy(Attribute<T> attribute) |
Returns the matching strategy for a given attribute.
|
boolean |
hasAttribute(Attribute<?> key) |
Returns true when this schema contains the given attribute.
|
void |
setAttributeDisambiguationPrecedence(Collection<Attribute<?>> attributes) |
Sets the order of precedence of attributes when resolving ambiguity.
|
<T> AttributeMatchingStrategy<T> getMatchingStrategy(Attribute<T> attribute) throws IllegalArgumentException
T - the type of the attributeattribute - the attributeIllegalArgumentException - When no strategy is available for the given attribute.<T> AttributeMatchingStrategy<T> attribute(Attribute<T> attribute)
T - the concrete type of the attributeattribute - the attribute to declare in the schema<T> AttributeMatchingStrategy<T> attribute(Attribute<T> attribute, Action<? super AttributeMatchingStrategy<T>> configureAction)
T - the concrete type of the attributeattribute - the attribute for which to configure the matching strategyconfigureAction - the strategy configurationboolean hasAttribute(Attribute<?> key)
@Incubating void attributeDisambiguationPrecedence(Attribute<?>... attributes)
The attributes will be added to any existing precedence order. If an attribute has already been added, adding it again will fail.
attributes - the attributes in ordersetAttributeDisambiguationPrecedence(Collection)@Incubating void setAttributeDisambiguationPrecedence(Collection<Attribute<?>> attributes)
By default, there is no explicit precedence between attributes and all attributes must be considered when disambiguating.
attributes - the attributes in order@Incubating Collection<Attribute<?>> getAttributeDisambiguationPrecedence()