com.togethersoft.openapi.util.file
Class SimpleWildcardFilter


public class SimpleWildcardFilter
implements FilenameFilter, UnaryCondition

Presents methods to match given path with specified wildcard mask.

Author:
TogetherSoft
See Also: UnaryCondition

Constructor Summary
SimpleWildcardFilter(String mask)
           Constructs new filter from specified wildcard mask.

Method Summary
 booleanaccept(File dir, String name)
           Matches given file name with wildcard mask.
 booleanexecute(Object pathObject)
           Matches file name from given path with wildcard mask.

Constructor Detail

SimpleWildcardFilter

public SimpleWildcardFilter(String mask)
Constructs new filter from specified wildcard mask.
Method Detail

accept

public boolean accept(File dir, String name)
Matches given file name with wildcard mask.
Parameters:
name - File name to be checked.
Returns: true if path accepted, false if not accepted.
See Also:
java.io.FilenameFilter.accept(java.io.File,java.lang.String)

execute

public boolean execute(Object pathObject)
Matches file name from given path with wildcard mask.
Parameters:
pathObject - Path string to be checked.
Returns: true if path accepted, false if not accepted or given pathObject is not String.
See Also:
com.togethersoft.openapi.util.function.UnaryCondition.execute(java.lang.Object)

Association Links

to Class java.lang.String

to Class java.lang.String