2.17.2: 2011-06-17

net.sf.basedb.util
Class AutoDetectFileFormat.IsImportableFilter

java.lang.Object
  extended by net.sf.basedb.util.AutoDetectFileFormat.IsImportableFilter
All Implemented Interfaces:
Filter<ContextUtil.ContextResult>
Enclosing class:
AutoDetectFileFormat

public static class AutoDetectFileFormat.IsImportableFilter
extends Object
implements Filter<ContextUtil.ContextResult>

Filter implementation that filters a collection of ContextUtil.ContextResult:s by checking each plug-ins ability to import a given file. Eg. the ContextResult is accepted if the AutoDetectingImporter.isImportable(InputStream) returns true. It is assumed that the collection of ContextResult:s only contains import plug-ins that implements the AutoDetectingImporter interface.

Version:
2.9
Author:
Nicklas
Last modified
$Date: 2011-03-15 14:53:10 +0100 (Tue, 15 Mar 2011) $

Field Summary
private  File file
           
private  Filter<? super ContextUtil.ContextResult> parent
           
 
Constructor Summary
AutoDetectFileFormat.IsImportableFilter(File file, Filter<? super ContextUtil.ContextResult> parent)
           
 
Method Summary
 boolean evaluate(ContextUtil.ContextResult result)
          Evaluate if the given object should pass the filter or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

file

private File file

parent

private Filter<? super ContextUtil.ContextResult> parent
Constructor Detail

AutoDetectFileFormat.IsImportableFilter

public AutoDetectFileFormat.IsImportableFilter(File file,
                                               Filter<? super ContextUtil.ContextResult> parent)
Method Detail

evaluate

public boolean evaluate(ContextUtil.ContextResult result)
Description copied from interface: Filter
Evaluate if the given object should pass the filter or not.

Specified by:
evaluate in interface Filter<ContextUtil.ContextResult>
Parameters:
result - The object to evaluate
Returns:
TRUE if the object passes the filter, FALSE otherwise

2.17.2: 2011-06-17