Class HasFilterSpec

java.lang.Object
org.wildfly.discovery.FilterSpec
org.wildfly.discovery.HasFilterSpec
All Implemented Interfaces:
Serializable

public final class HasFilterSpec extends FilterSpec
Author:
David M. Lloyd
See Also:
  • Constructor Details

    • HasFilterSpec

      public HasFilterSpec(String attribute)
  • Method Details

    • matchesSimple

      public boolean matchesSimple(Map<String,AttributeValue> attributes)
      Description copied from class: FilterSpec
      Determine whether the given simple attribute map matches this filter.
      Specified by:
      matchesSimple in class FilterSpec
      Parameters:
      attributes - the attribute map
      Returns:
      true if the map matches, false otherwise
    • matchesMulti

      public boolean matchesMulti(Map<String,? extends Collection<AttributeValue>> attributes)
      Description copied from class: FilterSpec
      Determine whether the given attribute multi-map matches this filter.
      Specified by:
      matchesMulti in class FilterSpec
      Parameters:
      attributes - the attribute map
      Returns:
      true if the map matches, false otherwise
    • mayMatch

      public boolean mayMatch(Collection<String> attributeNames)
      Description copied from class: FilterSpec
      Determine whether this filter spec might match an attribute map containing the given keys.
      Specified by:
      mayMatch in class FilterSpec
      Parameters:
      attributeNames - the attribute names
      Returns:
      true if the filter spec might match, false if it will definitely not match
    • mayNotMatch

      public boolean mayNotMatch(Collection<String> attributeNames)
      Description copied from class: FilterSpec
      Determine whether this filter spec might not match an attribute map containing the given keys.
      Specified by:
      mayNotMatch in class FilterSpec
      Parameters:
      attributeNames - the attribute names
      Returns:
      true if the filter spec might not match, false if it will definitely match
    • accept

      public <P, R, E extends Exception> R accept(FilterSpec.Visitor<P,R,E> visitor, P parameter) throws E
      Specified by:
      accept in class FilterSpec
      Throws:
      E extends Exception
    • getAttribute

      public String getAttribute()
      Get the attribute to compare.
      Returns:
      the attribute to compare (not null)
    • equals

      public boolean equals(FilterSpec other)
      Specified by:
      equals in class FilterSpec
    • equals

      public boolean equals(HasFilterSpec other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object