Class PrefixList


  • @ThreadSafe
    public final class PrefixList
    extends java.lang.Object
    Prefix list is used to do file filtering.
    • Constructor Summary

      Constructors 
      Constructor Description
      PrefixList​(java.lang.String prefixes, java.lang.String separator)
      Prefix list is used to do file filtering.
      PrefixList​(java.util.List<java.lang.String> prefixList)
      Prefix list is used to do file filtering.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.google.common.collect.ImmutableList<java.lang.String> getList()
      Gets the list of prefixes.
      boolean inList​(java.lang.String path)
      Checks whether a prefix of path is in the prefix list.
      boolean outList​(java.lang.String path)
      Checks whether a prefix of path is not in the prefix list.
      java.lang.String toString()
      Print out all prefixes separated by ";".
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • PrefixList

        public PrefixList​(java.util.List<java.lang.String> prefixList)
        Prefix list is used to do file filtering.
        Parameters:
        prefixList - the list of prefixes to create
      • PrefixList

        public PrefixList​(java.lang.String prefixes,
                          java.lang.String separator)
        Prefix list is used to do file filtering.
        Parameters:
        prefixes - the prefixes with separators
        separator - the separator to split the prefixes
    • Method Detail

      • getList

        public com.google.common.collect.ImmutableList<java.lang.String> getList()
        Gets the list of prefixes.
        Returns:
        the list of prefixes
      • inList

        public boolean inList​(java.lang.String path)
        Checks whether a prefix of path is in the prefix list.
        Parameters:
        path - the path to check
        Returns:
        true if the path is in the list, false otherwise
      • outList

        public boolean outList​(java.lang.String path)
        Checks whether a prefix of path is not in the prefix list.
        Parameters:
        path - the path to check
        Returns:
        true if the path is not in the list, false otherwise
      • toString

        public java.lang.String toString()
        Print out all prefixes separated by ";".
        Overrides:
        toString in class java.lang.Object
        Returns:
        the string representation like "a;b/c;"