public static Collection < AbstractAttribute > findAllAttributes ( final boolean parallel , final AbstractHtml ... fromTags ) throws NullValueException { if ( fromTags == null ) { throw new NullValueException ( "fromTags cannot be null" ) ; } final Collection < Lock > locks = getReadLocks ( fromTags ) ; for ( final Lock lock : locks ) { lock . lock ( ) ; } try { return getAllNestedChildrenIncludingParent ( parallel , fromTags ) . filter ( tag -> tag . getAttributes ( ) != null ) . map ( tag -> { return tag . getAttributes ( ) ; } ) . flatMap ( attributes -> attributes . stream ( ) ) . collect ( Collectors . toSet ( ) ) ; } finally { for ( final Lock lock : locks ) { lock . unlock ( ) ; } } }
Finds all attributes from the given tags