class AttributeDefinition {

    final AttributeName attributeName;
    private final Set<IElementProcessor> associatedProcessorsSet;
    final IElementProcessor[] associatedProcessors; // The internal representation is an array for better performance
    final boolean hasAssociatedProcessors;


    AttributeDefinition(final AttributeName attributeName, final Set<IElementProcessor> associatedProcessors) {

        super();

        if (attributeName == null) {
            throw new IllegalArgumentException("Attribute name cannot be null");
        }
        if (associatedProcessors == null) {
            throw new IllegalArgumentException("Associated processors cannot be null");
        }

        this.attributeName = attributeName;
        this.associatedProcessorsSet = Collections.unmodifiableSet(associatedProcessors);
        this.associatedProcessors = new IElementProcessor[this.associatedProcessorsSet.size()];
        int i = 0;
        for (final IElementProcessor processor : this.associatedProcessorsSet) {
            this.associatedProcessors[i++] = processor;
        }
        Arrays.sort(this.associatedProcessors, ProcessorComparators.PROCESSOR_COMPARATOR);
        this.hasAssociatedProcessors = this.associatedProcessors.length > 0;

    }


    public final AttributeName getAttributeName() {
        return this.attributeName;
    }




    public boolean hasAssociatedProcessors() {
        return this.hasAssociatedProcessors;
    }



    public Set<IElementProcessor> getAssociatedProcessors() {
        return this.associatedProcessorsSet;
    }



    public final String toString() {
        return getAttributeName().toString();
    }



    @Override
    public boolean equals(final Object o) {<FILL_FUNCTION_BODY>}


    @Override
    public int hashCode() {
        return this.attributeName.hashCode();
    }

}


        if (this == o) {
            return true;
        }

        if (!o.getClass().equals(this.getClass())) {
            return false;
        }

        final AttributeDefinition that = (AttributeDefinition) o;

        if (!this.attributeName.equals(that.attributeName)) {
            return false;
        }

        return true;
    
<no_super_class>