org.alfresco.util
Class RegexNameMatcher

java.lang.Object
  extended by org.alfresco.util.RegexNameMatcher
All Implemented Interfaces:
java.io.Serializable, NameMatcher

public class RegexNameMatcher
extends java.lang.Object
implements NameMatcher, java.io.Serializable

A name matcher that matches any of a list of regular expressions.

See Also:
Serialized Form

Constructor Summary
RegexNameMatcher()
          Default constructor.
 
Method Summary
 boolean matches(java.lang.String name)
          Does the given name match, in whatever way the implementation defines.
 void setPatterns(java.util.List patterns)
          Set the patterns.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegexNameMatcher

public RegexNameMatcher()
Default constructor.

Method Detail

setPatterns

public void setPatterns(java.util.List patterns)
Set the patterns.

Parameters:
patterns -

matches

public boolean matches(java.lang.String name)
Description copied from interface: NameMatcher
Does the given name match, in whatever way the implementation defines.

Specified by:
matches in interface NameMatcher
Parameters:
name - The name to check for matching.
Returns:
Whether the named matched.


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.