Class SetPathFilter

  • All Implemented Interfaces:
    PathFilter

    final class SetPathFilter
    extends java.lang.Object
    implements PathFilter
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int hashCode  
      private java.util.Set<java.lang.String> paths  
    • Constructor Summary

      Constructors 
      Constructor Description
      SetPathFilter​(java.util.Set<java.lang.String> paths)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean accept​(java.lang.String path)
      Determine whether a path should be accepted.
      boolean equals​(java.lang.Object obj)
      Determine whether this filter is equal to another.
      boolean equals​(SetPathFilter obj)  
      int hashCode()
      Calculate a unique hash code for this path filter.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • paths

        private final java.util.Set<java.lang.String> paths
      • hashCode

        private final int hashCode
    • Constructor Detail

      • SetPathFilter

        SetPathFilter​(java.util.Set<java.lang.String> paths)
    • Method Detail

      • accept

        public boolean accept​(java.lang.String path)
        Description copied from interface: PathFilter
        Determine whether a path should be accepted. The given name is a path separated by "/" characters.
        Specified by:
        accept in interface PathFilter
        Parameters:
        path - the path to check
        Returns:
        true if the path should be accepted, false if not
      • toString

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

        public boolean equals​(java.lang.Object obj)
        Description copied from interface: PathFilter
        Determine whether this filter is equal to another. Filters must implement meaningful (non-identity) equality semantics.
        Specified by:
        equals in interface PathFilter
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - the other object
        Returns:
        true if this filter is the same
      • hashCode

        public int hashCode()
        Description copied from interface: PathFilter
        Calculate a unique hash code for this path filter. Equal path filters must yield identical hash codes.
        Specified by:
        hashCode in interface PathFilter
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        the hash code