de.dv.sbu.filefilter.buildin
Class SuffixFilter

java.lang.Object
  extended by de.dv.sbu.filefilter.buildin.SuffixFilter
All Implemented Interfaces:
IFileFilter

public class SuffixFilter
extends java.lang.Object
implements IFileFilter

File filer filtering by suffixes. The filter can be case-sensitive or case-insensitive (default).

Author:
Daniel Vogtland

Constructor Summary
SuffixFilter()
           
 
Method Summary
 boolean acceptFile(SourceFileInformation fileInfo)
          Test the given file information object relative to some root directory.
 java.lang.String getSuffix()
          Returns the defined suffix.
 boolean isCaseSensitive()
          Returns the case-sensitive mode.
 void setCaseSensitive(boolean caseSensitive)
          Sets the case-sensitive flag.
 void setSuffix(java.lang.String suffix)
          Sets the defined suffix.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SuffixFilter

public SuffixFilter()
Method Detail

getSuffix

public java.lang.String getSuffix()
Returns the defined suffix.

Returns:
The defined suffix.

setSuffix

public void setSuffix(java.lang.String suffix)
               throws java.lang.NullPointerException
Sets the defined suffix.

Parameters:
suffix - The suffix to set.
Throws:
java.lang.NullPointerException - The argument is null.

isCaseSensitive

public boolean isCaseSensitive()
Returns the case-sensitive mode. If true suffix comparisons are case-sensitive.

Returns:
The flag's state.

setCaseSensitive

public void setCaseSensitive(boolean caseSensitive)
Sets the case-sensitive flag.

Parameters:
caseSensitive - The flag to set.

acceptFile

public boolean acceptFile(SourceFileInformation fileInfo)
Test the given file information object relative to some root directory.

Specified by:
acceptFile in interface IFileFilter
Parameters:
fileInfo - The file information to test.
Returns:
true if the file is accepted. false if the file is rejected.
See Also:
IFileFilter.acceptFile(de.dv.sbu.SourceFileInformation)