org.apache.tapestry.util.text
Class WhitespaceMatcher

java.lang.Object
  extended by org.apache.tapestry.util.text.WhitespaceMatcher
All Implemented Interfaces:
ICharacterMatcher

public class WhitespaceMatcher
extends Object
implements ICharacterMatcher

Matches a whitespace character.

Since:
4.0
Author:
mb

Constructor Summary
WhitespaceMatcher()
          Creates an object that matches all whitespace characters, line terminators included.
WhitespaceMatcher(boolean matchEndLines)
          Creates an object that matches whitespace characters.
 
Method Summary
 boolean matches(char ch)
          Matches whitespace characters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WhitespaceMatcher

public WhitespaceMatcher()
Creates an object that matches all whitespace characters, line terminators included.


WhitespaceMatcher

public WhitespaceMatcher(boolean matchEndLines)
Creates an object that matches whitespace characters. Line terminators are included only if this is specified.

Parameters:
matchEndLines - match line terminators as well
Method Detail

matches

public boolean matches(char ch)
Matches whitespace characters. Line terminators may be matched depending on the constructor used to create the object.

Specified by:
matches in interface ICharacterMatcher
Parameters:
ch - the character to be matched
Returns:
true if the character matches the rule
See Also:
ICharacterMatcher.matches(char)


Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.