Class MultiAttributeCollection

  • All Implemented Interfaces:
    Serializable, Cloneable, Iterable<Attribute>, AttributeCollection, AttributeProvider, JsonableObject

    public class MultiAttributeCollection
    extends MultiAttributeProvider
    implements AttributeCollection
    This class contains a collection of attribute providers and tries to gather the data. This class contains a collection of AttributeProviders and exhibites the values of the attributes of all these providers. This class follows the following rules (in that order) to retreive the value of an attribute:
    1. If the attribute is defined in none of the containers, throws the standard exception;
    2. If the attribute is defined in only one of the containers, replies the attribute value itself;
    3. If the attribute is defined in more than one container:
      1. if all the values are equal, then replies one of the attribute values;
      2. if the values are not equal and all the values have equivalent types (as replied by AttributeType.isAssignableFrom(AttributeType)), then replies an attribute value with a "undefined" value and of the type of one of the values;
      3. if the values are not equal and one of the value has not an equivalent type to the others (as replied by AttributeType.isAssignableFrom(AttributeType)), then replies an attribute value with a "undefined" value and of the type OBJECT.

    If an attribute is set from this AttributeProviderContainer, all the containers inside it are changed.

    Since:
    4.0
    Version:
    17.0 2020-01-04 14:41:51
    Author:
    Stéphane GALLAND
    See Also:
    Serialized Form
    Maven Group Id:
    org.arakhne.afc.advanced
    Maven Artifact Id:
    attributes