net.sf.mmm.util.cli.api
Class CliOptionNameDefaultFilter

java.lang.Object
  extended by net.sf.mmm.util.cli.api.CliOptionNameDefaultFilter
All Implemented Interfaces:
Filter<String>

public class CliOptionNameDefaultFilter
extends Object
implements Filter<String>

This is the default Filter used to decide if the name or alias of a CliOption is acceptable.

Since:
2.0.0
Author:
Joerg Hohwiller (hohwille at users.sourceforge.net)
See Also:
CliStyle.optionNameFilter()

Constructor Summary
CliOptionNameDefaultFilter()
           
 
Method Summary
protected  boolean accept(char c)
          This method determines if a character the name (excluding the initial hyphens) is acceptable.
 boolean accept(String name)
          This method determines if the given value should be accepted.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CliOptionNameDefaultFilter

public CliOptionNameDefaultFilter()
Method Detail

accept

protected boolean accept(char c)
This method determines if a character the name (excluding the initial hyphens) is acceptable. You may extend this class and override this method to declare a less strict naming style.

Parameters:
c - is the character to check.
Returns:
true if the given character is acceptable, false otherwise.

accept

public boolean accept(String name)
This method determines if the given value should be accepted.

Specified by:
accept in interface Filter<String>
Parameters:
name - is the value to check.
Returns:
true if the given value is acceptable, false if it should be filtered.


Copyright © 2001-2010 mmm-Team. All Rights Reserved.