- Enclosing class:
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public static interface Attributes.FilterLambda-target for creating attribute-filters.
functional interfacecan be implemented by a class, or by a lambda-expression. It is used by the methods in
class Attributesthat have the name
'filter(...)'. Generally, a user should employ a
'filter'method if he or she wishes to perform a bulk removal of attributes from all of the
TagNode'scontained by a vectorized-html web-page.
By implementing an instance of
'Filter', a programmer may selectively choose which attribute key-value pair in each and every
TagNodeof a web-page, or sub-list, using a single lambda-expression.
@FunctionalInterface (Lambda) Method Modifier and Type Method
filter(String htmlTag, Properties attributes)
boolean filter(java.lang.String htmlTag, java.util.Properties attributes)This receives the contents of a
'TagNode'- after the html-tag and the inner-tags have been extracted. This method is intended to be used to selectively remove specific inner-tags / attributes that the programmer would like to see removed.
htmlTag- When this method is implemented by a class, or by a lambda-expression, the user will receive a copy of a TagNode's
TagNode.tokfield through this parameter. The class or lambda-expression which implements method
'filter(...)'may use the
Stringthat is passed via the
'htmlTag'parameter to, possibly - if needed, help decide which attributes to remove from the
attributes- When this method,
'filter(...)', is implemented by a class or a lambda-expression, he or she is tasked with eliminating any attributes in this
Propertiesclass that he wishes to filter.
NOTE: The key-value pairs of this
java.util.Propertiesmethod are generated by calling
TagNode.allAV(boolean, boolean). The values returned by that method will all have their original quotation-marks included in the
ALSO: This class is intended to function as a filter, and should be used to remove property key-value pairs from the attributes parameter received here. However, there is nothing stopping the programmer from modifying the contents by adding properties, or even changing the values of the properties.
- This method must return a boolean indicating whether or not the attributes
parameter has been changed in any way. If FALSE were returned, but the class or
lambda-expression which implements this method has modified the attributes
Propertiesinstance, the changes that were made would be lost, and the vectorized-html page that contained the
TagNodewouldn't be updated with the new
- See Also: