com.arsdigita.persistence.pdl
Class NameFilter

java.lang.Object
  extended bycom.arsdigita.persistence.pdl.NameFilter
All Implemented Interfaces:
PDLFilter

public class NameFilter
extends Object
implements PDLFilter

An implementation of PDLFilter that filters based on extension and suffix.

Version:
$Revision: #6 $ $Date: 2004/04/07 $
Author:
Rafael H. Schloming <rhs@mit.edu>

Field Summary
static String versionId
           
 
Constructor Summary
NameFilter(String suffix, String extension)
          Constructs a name filter that only accepts pdl files with the given suffix and extension.
 
Method Summary
 Collection accept(Collection names)
          Tests name against this NameFilters suffix and extension.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

versionId

public static final String versionId
See Also:
Constant Field Values
Constructor Detail

NameFilter

public NameFilter(String suffix,
                  String extension)
Constructs a name filter that only accepts pdl files with the given suffix and extension.

Parameters:
suffix - the allowed suffix
extension - the allowed extension
Method Detail

accept

public Collection accept(Collection names)
Tests name against this NameFilters suffix and extension.

Specified by:
accept in interface PDLFilter
Parameters:
names - a collection of strings to test
Returns:
the collection of accepted names


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 20 2004:2337 UTC