Package jadex.commons

Class FileFilter

  • All Implemented Interfaces:
    IFilter<java.lang.Object>

    public class FileFilter
    extends java.lang.Object
    implements IFilter<java.lang.Object>
    Filter for files and jar entries.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.List<IFilter<java.lang.String>> filters
      The filename filters.
    • Constructor Summary

      Constructors 
      Constructor Description
      FileFilter​(java.lang.String suffix)
      Create a new file filter.
      FileFilter​(java.lang.String filename, boolean contains)
      Create a new file filter.
      FileFilter​(java.lang.String filename, boolean contains, java.lang.String suffix)
      Create a new file filter.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      FileFilter addFilenameFilter​(IFilter<java.lang.String> filter)
      Add a filename filter
      boolean filter​(java.lang.Object obj)
      Filter impl.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • filters

        protected java.util.List<IFilter<java.lang.String>> filters
        The filename filters.
    • Constructor Detail

      • FileFilter

        public FileFilter​(java.lang.String filename,
                          boolean contains)
        Create a new file filter.
      • FileFilter

        public FileFilter​(java.lang.String suffix)
        Create a new file filter.
      • FileFilter

        public FileFilter​(java.lang.String filename,
                          boolean contains,
                          java.lang.String suffix)
        Create a new file filter.
    • Method Detail

      • addFilenameFilter

        public FileFilter addFilenameFilter​(IFilter<java.lang.String> filter)
        Add a filename filter
        Parameters:
        filter - The filter to add.
        Returns:
        This filter (builder pattern).
      • filter

        public boolean filter​(java.lang.Object obj)
        Filter impl.
        Specified by:
        filter in interface IFilter<java.lang.Object>
        Returns:
        True, if passes the filter.