Java Doc for StrMatcher.java in  » Library » Apache-common-lang » org » apache » commons » lang » text » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Library » Apache common lang » org.apache.commons.lang.text 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.commons.lang.text.StrMatcher

StrMatcher
abstract public class StrMatcher (Code)
A matcher class that can be queried to determine if a character array portion matches.

This class comes complete with various factory methods. If these do not suffice, you can subclass and implement your own matcher.
author:
   Stephen Colebourne
since:
   2.2
version:
   $Id: StrMatcher.java 437554 2006-08-28 06:21:41Z bayard $


Inner Class :final static class CharSetMatcher extends StrMatcher
Inner Class :final static class CharMatcher extends StrMatcher
Inner Class :final static class StringMatcher extends StrMatcher
Inner Class :final static class NoMatcher extends StrMatcher
Inner Class :final static class TrimMatcher extends StrMatcher


Constructor Summary
protected  StrMatcher()
     Constructor.

Method Summary
public static  StrMatchercharMatcher(char ch)
     Constructor that creates a matcher from a character.
public static  StrMatchercharSetMatcher(char[] chars)
     Constructor that creates a matcher from a set of characters.
public static  StrMatchercharSetMatcher(String chars)
     Constructor that creates a matcher from a string representing a set of characters.
public static  StrMatchercommaMatcher()
     Returns a matcher which matches the comma character.
public static  StrMatcherdoubleQuoteMatcher()
     Returns a matcher which matches the double quote character.
abstract public  intisMatch(char[] buffer, int pos, int bufferStart, int bufferEnd)
     Returns the number of matching characters, zero for no match.
public static  StrMatchernoneMatcher()
     Matches no characters.
public static  StrMatcherquoteMatcher()
     Returns a matcher which matches the single or double quote character.
public static  StrMatchersingleQuoteMatcher()
     Returns a matcher which matches the single quote character.
public static  StrMatcherspaceMatcher()
     Returns a matcher which matches the space character.
public static  StrMatchersplitMatcher()
     Matches the same characters as StringTokenizer, namely space, tab, newline and formfeed.
public static  StrMatcherstringMatcher(String str)
     Constructor that creates a matcher from a string.
public static  StrMatchertabMatcher()
     Returns a matcher which matches the tab character.
public static  StrMatchertrimMatcher()
     Matches the String trim() whitespace characters.


Constructor Detail
StrMatcher
protected StrMatcher()(Code)
Constructor.




Method Detail
charMatcher
public static StrMatcher charMatcher(char ch)(Code)
Constructor that creates a matcher from a character.
Parameters:
  ch - the character to match, must not be null a new Matcher for the given char



charSetMatcher
public static StrMatcher charSetMatcher(char[] chars)(Code)
Constructor that creates a matcher from a set of characters.
Parameters:
  chars - the characters to match, null or empty matches nothing a new matcher for the given char[]



charSetMatcher
public static StrMatcher charSetMatcher(String chars)(Code)
Constructor that creates a matcher from a string representing a set of characters.
Parameters:
  chars - the characters to match, null or empty matches nothing a new Matcher for the given characters



commaMatcher
public static StrMatcher commaMatcher()(Code)
Returns a matcher which matches the comma character. a matcher for a comma



doubleQuoteMatcher
public static StrMatcher doubleQuoteMatcher()(Code)
Returns a matcher which matches the double quote character. a matcher for a double quote



isMatch
abstract public int isMatch(char[] buffer, int pos, int bufferStart, int bufferEnd)(Code)
Returns the number of matching characters, zero for no match.

This method is called to check for a match. The parameter pos represents the current position to be checked in the string buffer (a character array which must not be changed). The API guarantees that pos is a valid index for buffer.

The character array may be larger than the active area to be matched. Only values in the buffer between the specifed indices may be accessed.

The matching code may check one character or many. It may check characters preceeding pos as well as those after, so long as no checks exceed the bounds specified.

It must return zero for no match, or a positive number if a match was found. The number indicates the number of characters that matched.
Parameters:
  buffer - the text content to match against, do not change
Parameters:
  pos - the starting position for the match, valid for buffer
Parameters:
  bufferStart - the first active index in the buffer, valid for buffer
Parameters:
  bufferEnd - the end index (exclusive) of the active buffer, valid for buffer the number of matching characters, zero for no match




noneMatcher
public static StrMatcher noneMatcher()(Code)
Matches no characters. a matcher that matches nothing



quoteMatcher
public static StrMatcher quoteMatcher()(Code)
Returns a matcher which matches the single or double quote character. a matcher for a single or double quote



singleQuoteMatcher
public static StrMatcher singleQuoteMatcher()(Code)
Returns a matcher which matches the single quote character. a matcher for a single quote



spaceMatcher
public static StrMatcher spaceMatcher()(Code)
Returns a matcher which matches the space character. a matcher for a space



splitMatcher
public static StrMatcher splitMatcher()(Code)
Matches the same characters as StringTokenizer, namely space, tab, newline and formfeed. the split matcher



stringMatcher
public static StrMatcher stringMatcher(String str)(Code)
Constructor that creates a matcher from a string.
Parameters:
  str - the string to match, null or empty matches nothing a new Matcher for the given String



tabMatcher
public static StrMatcher tabMatcher()(Code)
Returns a matcher which matches the tab character. a matcher for a tab



trimMatcher
public static StrMatcher trimMatcher()(Code)
Matches the String trim() whitespace characters. the trim matcher



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.