public static Collection<AbstractHtml> findTagsByAttributeName(
            final boolean parallel, final String attributeName,
            final AbstractHtml... fromTags) throws NullValueException {
    """
	Finds and returns the collection of tags (including the nested tags)
	matching with the given attribute name.
	
	@param parallel
	true to internally use parallel stream. If true
	it will split the finding task to different
	batches and will execute the batches in
	different threads in parallel consuming all
	CPUs. It will perform faster in finding from
	extremely large number of tags but at the same
	time it will less efficient in finding from
	small number of tags.
	
	@param attributeName
	the name of the attribute.
	@param fromTags
	from which the findings to be done.
	@return the collection of tags matching with the given attribute.
	@throws NullValueException
	if the {@code attributeName} or
	{@code fromTags} is null
	@since 3.0.0
	@author WFF
    """

        if (attributeName == null) {
            throw new NullValueException(
                    "The attributeName should not be null");
        }

        if (fromTags == null) {
            throw new NullValueException("The fromTags should not be null");
        }

        final Collection<Lock> locks = getReadLocks(fromTags);
        for (final Lock lock : locks) {
            lock.lock();
        }

        try {
            return getAllNestedChildrenIncludingParent(parallel, fromTags)
                    .filter(child -> {

                        return child.getAttributeByName(attributeName) != null;
                    }).collect(Collectors.toSet());
        } finally {
            for (final Lock lock : locks) {
                lock.unlock();
            }
        }
    }
public static Collection<AbstractHtml> findTagsByAttributeName(
            final boolean parallel, final String attributeName,
            final AbstractHtml... fromTags) throws NullValueException {

        if (attributeName == null) {
            throw new NullValueException(
                    "The attributeName should not be null");
        }

        if (fromTags == null) {
            throw new NullValueException("The fromTags should not be null");
        }

        final Collection<Lock> locks = getReadLocks(fromTags);
        for (final Lock lock : locks) {
            lock.lock();
        }

        try {
            return getAllNestedChildrenIncludingParent(parallel, fromTags)
                    .filter(child -> {

                        return child.getAttributeByName(attributeName) != null;
                    }).collect(Collectors.toSet());
        } finally {
            for (final Lock lock : locks) {
                lock.unlock();
            }
        }
    }
public static Collection < AbstractHtml > findTagsByAttributeName ( final boolean parallel , final String attributeName , final AbstractHtml ... fromTags ) throws NullValueException { if ( attributeName == null ) { throw new NullValueException ( "The attributeName should not be null" ) ; } if ( fromTags == null ) { throw new NullValueException ( "The fromTags should not be null" ) ; } final Collection < Lock > locks = getReadLocks ( fromTags ) ; for ( final Lock lock : locks ) { lock . lock ( ) ; } try { return getAllNestedChildrenIncludingParent ( parallel , fromTags ) . filter ( child -> { return child . getAttributeByName ( attributeName ) != null ; } ) . collect ( Collectors . toSet ( ) ) ; } finally { for ( final Lock lock : locks ) { lock . unlock ( ) ; } } }
Finds and returns the collection of tags (including the nested tags)
matching with the given attribute name.

@param parallel
true to internally use parallel stream. If true
it will split the finding task to different
batches and will execute the batches in
different threads in parallel consuming all
CPUs. It will perform faster in finding from
extremely large number of tags but at the same
time it will less efficient in finding from
small number of tags.

@param attributeName
the name of the attribute.
@param fromTags
from which the findings to be done.
@return the collection of tags matching with the given attribute.
@throws NullValueException
if the {@code attributeName} or
{@code fromTags} is null
@since 3.0.0
@author WFF
Finds and returns the collection of tags ( including the nested tags ) matching with the given attribute name .