Class DefaultAttributeBuilder

    • Constructor Detail

      • DefaultAttributeBuilder

        public DefaultAttributeBuilder()
    • Method Detail

      • createAttribute

        public <T> Attribute<T> createAttribute​(String name)
        Create Attribute with name
        Specified by:
        createAttribute in interface AttributeBuilder
        Type Parameters:
        T - Type of attribute value
        Parameters:
        name - attribute name
        Returns:
        Attribute
      • createAttribute

        public <T> Attribute<T> createAttribute​(String name,
                                                T defaultValue)
        Create Attribute with name and default value
        Specified by:
        createAttribute in interface AttributeBuilder
        Type Parameters:
        T - Type of attribute value
        Parameters:
        name - attribute name
        defaultValue - attribute's default value
        Returns:
        Attribute
      • createAttribute

        public <T> Attribute<T> createAttribute​(String name,
                                                NullaryFunction<T> initializer)
        Create Attribute with name and initializer, which will be called, if Attribute's value is null on a AttributedObject
        Specified by:
        createAttribute in interface AttributeBuilder
        Type Parameters:
        T - Type of attribute value
        Parameters:
        name - attribute name
        initializer - NullaryFunction, which will be called, if Attribute's value is null on a AttributedObject
        Returns:
        Attribute
      • createAttribute

        public <T> Attribute<T> createAttribute​(String name,
                                                NullaryFunction<T> initializer)
        Description copied from interface: AttributeBuilder
        Create Attribute with name and initializer, which will be called, if Attribute's value is null on a AttributedObject
        Specified by:
        createAttribute in interface AttributeBuilder
        Type Parameters:
        T - Type of attribute value
        Parameters:
        name - attribute name
        initializer - NullaryFunction, which will be called, if Attribute's value is null on a AttributedObject
        Returns:
        Attribute
      • getAttributeByName

        protected Attribute getAttributeByName​(String name)
      • getAttributeByIndex

        protected Attribute getAttributeByIndex​(int index)