Class ResourceFilter


  • @Evolving
    public class ResourceFilter
    extends java.lang.Object
    A filter which matches Resource objects. The API for this class is still evolving and we may break compatibility in minor releases, if necessary.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static ResourceFilter ANY
      Matches any resource.
    • Constructor Summary

      Constructors 
      Constructor Description
      ResourceFilter​(ResourceType resourceType, java.lang.String name)
      Create an instance of this class with the provided parameters.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      java.lang.String findIndefiniteField()
      Return a string describing an ANY or UNKNOWN field, or null if there is no such field.
      int hashCode()  
      boolean isUnknown()
      Return true if this ResourceFilter has any UNKNOWN components.
      boolean matches​(Resource other)
      Return true if this filter matches the given Resource.
      boolean matchesAtMostOne()
      Return true if this filter could only match one ACE.
      java.lang.String name()
      Return the resource name or null.
      ResourceType resourceType()
      Return the resource type.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

    • Constructor Detail

      • ResourceFilter

        public ResourceFilter​(ResourceType resourceType,
                              java.lang.String name)
        Create an instance of this class with the provided parameters.
        Parameters:
        resourceType - non-null resource type
        name - resource name or null
    • Method Detail

      • resourceType

        public ResourceType resourceType()
        Return the resource type.
      • name

        public java.lang.String name()
        Return the resource name or null.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • isUnknown

        public boolean isUnknown()
        Return true if this ResourceFilter has any UNKNOWN components.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • matches

        public boolean matches​(Resource other)
        Return true if this filter matches the given Resource.
      • matchesAtMostOne

        public boolean matchesAtMostOne()
        Return true if this filter could only match one ACE. In other words, if there are no ANY or UNKNOWN fields.
      • findIndefiniteField

        public java.lang.String findIndefiniteField()
        Return a string describing an ANY or UNKNOWN field, or null if there is no such field.