Java Doc for SearchPattern.java in  » IDE-Eclipse » ui-workbench » org » eclipse » ui » dialogs » 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 » IDE Eclipse » ui workbench » org.eclipse.ui.dialogs 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.eclipse.ui.dialogs.SearchPattern

SearchPattern
public class SearchPattern (Code)
A search pattern defines how search results are found.

This class is intended to be subclassed by clients. A default behavior is provided for each of the methods above, that clients can ovveride if they wish.


since:
   3.3


Field Summary
final public static  intRULE_BLANK_MATCH
     Match rule: The search pattern is blank.
final public static  intRULE_CAMELCASE_MATCH
     Match rule: The search pattern contains a Camel Case expression.
final public static  intRULE_CASE_SENSITIVE
     Match rule: The search pattern matches the search result only if cases are the same.
final public static  intRULE_EXACT_MATCH
     Match rule: The search pattern matches exactly the search result, that is, the source of the search result equals the search pattern.
final public static  intRULE_PATTERN_MATCH
     Match rule: The search pattern contains one or more wild cards ('*' or '?').
final public static  intRULE_PREFIX_MATCH
     Match rule: The search pattern is a prefix of the search result.

Constructor Summary
public  SearchPattern()
    
public  SearchPattern(int allowedRules)
     Creates a search pattern with the rule to apply for matching index keys. It can be exact match, prefix match, pattern match or camelCase match. Rule can also be combined with a case sensitivity flag.
Parameters:
  allowedRules - one of SearchPattern.RULE_EXACT_MATCH, SearchPattern.RULE_PREFIX_MATCH,SearchPattern.RULE_PATTERN_MATCH, SearchPattern.RULE_CASE_SENSITIVE,SearchPattern.RULE_CAMELCASE_MATCH combined with one of followingvalues: SearchPattern.RULE_EXACT_MATCH, SearchPattern.RULE_PREFIX_MATCH,SearchPattern.RULE_PATTERN_MATCH or SearchPattern.RULE_CAMELCASE_MATCH.e.g.

Method Summary
public  booleanequalsPattern(SearchPattern pattern)
     Tells whether the given SearchPattern equals this pattern.
final public  intgetMatchRule()
     Returns the rule to apply for matching keys.
public  StringgetPattern()
    
protected  booleanisNameCharAllowed(char nameChar)
     Checks character of element's name is allowed for specified set.
protected  booleanisPatternCharAllowed(char patternChar)
     Checks pattern's character is allowed for specified set.
public  booleanisSubPattern(SearchPattern pattern)
     Tells whether the given SearchPattern is a subpattern of this pattern.
protected  booleanisValidCamelCaseChar(char ch)
    
public  booleanmatches(String text)
     Matches text with pattern.
public  voidsetPattern(String stringPattern)
    

Field Detail
RULE_BLANK_MATCH
final public static int RULE_BLANK_MATCH(Code)
Match rule: The search pattern is blank.



RULE_CAMELCASE_MATCH
final public static int RULE_CAMELCASE_MATCH(Code)
Match rule: The search pattern contains a Camel Case expression.
Examples:
  • NPE type string pattern will match NullPointerException and NpPermissionException types,
  • NuPoEx type string pattern will only match NullPointerException type.

Can be combined to SearchPattern.RULE_PREFIX_MATCH match rule. For example, when prefix match rule is combined with Camel Case match rule, "nPE" pattern will match nPException.
Match rule SearchPattern.RULE_PATTERN_MATCH may also be combined but both rules will not be used simultaneously as they are mutually exclusive. Used match rule depends on whether string pattern contains specific pattern characters (e.g. '*' or '?') or not. If it does, then only Pattern match rule will be used, otherwise only Camel Case match will be used. For example, with "NPE" string pattern, search will only use Camel Case match rule, but with N*P*E* string pattern, it will use only Pattern match rule.



RULE_CASE_SENSITIVE
final public static int RULE_CASE_SENSITIVE(Code)
Match rule: The search pattern matches the search result only if cases are the same. Can be combined to previous rules, e.g. SearchPattern.RULE_EXACT_MATCH | SearchPattern.RULE_CASE_SENSITIVE



RULE_EXACT_MATCH
final public static int RULE_EXACT_MATCH(Code)
Match rule: The search pattern matches exactly the search result, that is, the source of the search result equals the search pattern. Search pattern should start from lowerCase char.



RULE_PATTERN_MATCH
final public static int RULE_PATTERN_MATCH(Code)
Match rule: The search pattern contains one or more wild cards ('*' or '?'). A '*' wild-card can replace 0 or more characters in the search result. A '?' wild-card replaces exactly 1 character in the search result.



RULE_PREFIX_MATCH
final public static int RULE_PREFIX_MATCH(Code)
Match rule: The search pattern is a prefix of the search result.




Constructor Detail
SearchPattern
public SearchPattern()(Code)
Creates new instance of SearchPattern Default allowedRules for it is result of belong logic operation: ( RULE_EXACT_MATCH | RULE_PREFIX_MATCH | RULE_PATTERN_MATCH | RULE_CAMELCASE_MATCH )



SearchPattern
public SearchPattern(int allowedRules)(Code)
Creates a search pattern with the rule to apply for matching index keys. It can be exact match, prefix match, pattern match or camelCase match. Rule can also be combined with a case sensitivity flag.
Parameters:
  allowedRules - one of SearchPattern.RULE_EXACT_MATCH, SearchPattern.RULE_PREFIX_MATCH,SearchPattern.RULE_PATTERN_MATCH, SearchPattern.RULE_CASE_SENSITIVE,SearchPattern.RULE_CAMELCASE_MATCH combined with one of followingvalues: SearchPattern.RULE_EXACT_MATCH, SearchPattern.RULE_PREFIX_MATCH,SearchPattern.RULE_PATTERN_MATCH or SearchPattern.RULE_CAMELCASE_MATCH.e.g. SearchPattern.RULE_EXACT_MATCH | SearchPattern.RULE_CASE_SENSITIVEif an exact and case sensitive match is requested,SearchPattern.RULE_PREFIX_MATCH if a prefix non case sensitivematch is requested or SearchPattern.RULE_EXACT_MATCH if a non casesensitive and erasure match is requested.
Note also that default behavior for generic types/methodssearch is to find exact matches.




Method Detail
equalsPattern
public boolean equalsPattern(SearchPattern pattern)(Code)
Tells whether the given SearchPattern equals this pattern.
Parameters:
  pattern - pattern to be checked true if the given pattern equals this search pattern



getMatchRule
final public int getMatchRule()(Code)
Returns the rule to apply for matching keys. Can be exact match, prefix match, pattern match or camelcase match. Rule can also be combined with a case sensitivity flag. one of RULE_EXACT_MATCH, RULE_PREFIX_MATCH, RULE_PATTERN_MATCH,RULE_CAMELCASE_MATCH, combined with RULE_CASE_SENSITIVE, e.g.RULE_EXACT_MATCH | RULE_CASE_SENSITIVE if an exact and casesensitive match is requested, or RULE_PREFIX_MATCH if a prefixnon case sensitive match is requested.



getPattern
public String getPattern()(Code)
Gets string pattern used by matcher pattern



isNameCharAllowed
protected boolean isNameCharAllowed(char nameChar)(Code)
Checks character of element's name is allowed for specified set. It could be override if you want change logic of camelCaseMatch methods.
Parameters:
  nameChar - -name of searched element if nameChar is in set of allowed characters for name of element



isPatternCharAllowed
protected boolean isPatternCharAllowed(char patternChar)(Code)
Checks pattern's character is allowed for specified set. It could be override if you want change logic of camelCaseMatch methods.
Parameters:
  patternChar - true if patternChar is in set of allowed characters for pattern



isSubPattern
public boolean isSubPattern(SearchPattern pattern)(Code)
Tells whether the given SearchPattern is a subpattern of this pattern.
Parameters:
  pattern - pattern to be checked true if the given pattern is a sub pattern of this search pattern



isValidCamelCaseChar
protected boolean isValidCamelCaseChar(char ch)(Code)
Check if character is valid camelCase character
Parameters:
  ch - character to be validated true if character is valid



matches
public boolean matches(String text)(Code)
Matches text with pattern. matching is determine by matchKind.
Parameters:
  text - true if search pattern was matched with text false in other way



setPattern
public void setPattern(String stringPattern)(Code)

Parameters:
  stringPattern - The stringPattern to set.



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.