Java Doc for AbstractSet.java in  » Apache-Harmony-Java-SE » java-package » java » util » regex » 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 » Apache Harmony Java SE » java package » java.util.regex 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.util.regex.AbstractSet

All known Subclasses:   java.util.regex.EOISet,  java.util.regex.UEOLSet,  java.util.regex.MultiLineEOLSet,  java.util.regex.UMultiLineEOLSet,  java.util.regex.JointSet,  java.util.regex.PreviousMatch,  java.util.regex.SOLSet,  java.util.regex.LeafSet,  java.util.regex.QuantifierSet,  java.util.regex.MultiLineSOLSet,  java.util.regex.FSet,  java.util.regex.WordBoundary,  java.util.regex.EOLSet,
AbstractSet
abstract class AbstractSet (Code)
Basic class for nodes, representing given regular expression. Note: All the classes representing nodes has set prefix;
author:
   Nikolay A. Kuznetsov
version:
   $Revision: 1.12.2.2 $


Field Summary
final public static  intTYPE_DOTSET
    
final public static  intTYPE_FSET
    
final public static  intTYPE_LEAF
    
final public static  intTYPE_QUANT
    
static  intcounter
    
protected  Stringindex
    
protected  booleanisSecondPassVisited
    
protected  AbstractSetnext
    

Constructor Summary
public  AbstractSet()
    
public  AbstractSet(AbstractSet n)
    

Method Summary
public  intfind(int stringIndex, CharSequence testString, MatchResultImpl matchResult)
     Attempts to apply pattern starting from this set/stringIndex; returns index this search was started from, if value is negative, this means that this search didn't succeed, additional information could be obtained via matchResult; Note: this is default implementation for find method, it's based on matches, subclasses do not have to override find method unless more effective find method exists for a particular node type (sequence, i.e.
public  intfindBack(int stringIndex, int startSearch, CharSequence testString, MatchResultImpl matchResult)
    
public  booleanfirst(AbstractSet set)
     Returns true if the given node intersects with this one, false otherwise.
abstract protected  StringgetName()
     Returns name for the particular node type.
public  AbstractSetgetNext()
     Returns the next.
protected  StringgetQualifiedName()
    
public  intgetType()
    
abstract public  booleanhasConsumed(MatchResultImpl matchResult)
     Returns true, if this node has consumed any characters during positive match attempt, for example node representing character always consumes one character if it matches.
abstract public  intmatches(int stringIndex, CharSequence testString, MatchResultImpl matchResult)
     Checks if this node matches in given position and recursively call next node matches on positive self match.
public  JointSetprocessBackRefReplacement()
     This method is used for replacement backreferenced sets.
public  voidprocessSecondPass()
     This method is used for traversing nodes after the first stage of compilation.
public  voidsetNext(AbstractSet next)
    
protected  voidsetType(int type)
    
public  StringtoString()
    

Field Detail
TYPE_DOTSET
final public static int TYPE_DOTSET(Code)



TYPE_FSET
final public static int TYPE_FSET(Code)



TYPE_LEAF
final public static int TYPE_LEAF(Code)



TYPE_QUANT
final public static int TYPE_QUANT(Code)



counter
static int counter(Code)
Counter for debugging purposes, represent unique node index;



index
protected String index(Code)



isSecondPassVisited
protected boolean isSecondPassVisited(Code)



next
protected AbstractSet next(Code)
Next node to visit




Constructor Detail
AbstractSet
public AbstractSet()(Code)



AbstractSet
public AbstractSet(AbstractSet n)(Code)




Method Detail
find
public int find(int stringIndex, CharSequence testString, MatchResultImpl matchResult)(Code)
Attempts to apply pattern starting from this set/stringIndex; returns index this search was started from, if value is negative, this means that this search didn't succeed, additional information could be obtained via matchResult; Note: this is default implementation for find method, it's based on matches, subclasses do not have to override find method unless more effective find method exists for a particular node type (sequence, i.e. substring, for example). Same applies for find back method.
Parameters:
  stringIndex - starting index
Parameters:
  testString - string to search in
Parameters:
  matchResult - result of the match last searched index



findBack
public int findBack(int stringIndex, int startSearch, CharSequence testString, MatchResultImpl matchResult)(Code)

Parameters:
  stringIndex - -an index, to finish search back (left limit)
Parameters:
  startSearch - -an index to start search from (right limit)
Parameters:
  testString - -test string;
Parameters:
  matchResult - match result an index to start back search next time if this search fails(newleft bound); if this search fails the value is negative;



first
public boolean first(AbstractSet set)(Code)
Returns true if the given node intersects with this one, false otherwise. This method is being used for quantifiers construction, lets consider the following regular expression (a|b)*ccc. (a|b) does not intersects with "ccc" and thus can be quantified greedily (w/o kickbacks), like *+ instead of *.
Parameters:
  set - - usually previous node true if the given node intersects with this one



getName
abstract protected String getName()(Code)
Returns name for the particular node type. Used for debugging purposes.



getNext
public AbstractSet getNext()(Code)
Returns the next.



getQualifiedName
protected String getQualifiedName()(Code)



getType
public int getType()(Code)



hasConsumed
abstract public boolean hasConsumed(MatchResultImpl matchResult)(Code)
Returns true, if this node has consumed any characters during positive match attempt, for example node representing character always consumes one character if it matches. If particular node matches empty sting this method will return false;
Parameters:
  matchResult -



matches
abstract public int matches(int stringIndex, CharSequence testString, MatchResultImpl matchResult)(Code)
Checks if this node matches in given position and recursively call next node matches on positive self match. Returns positive integer if entire match succeed, negative otherwise
Parameters:
  stringIndex - - string index to start from;
Parameters:
  testString - - input string
Parameters:
  matchResult - - MatchResult to sore result into -1 if match fails or n > 0;



processBackRefReplacement
public JointSet processBackRefReplacement()(Code)
This method is used for replacement backreferenced sets.
Parameters:
  prev - - node who references to this node null if current node need not to be replacedJointSet which is replacement of current node otherwise



processSecondPass
public void processSecondPass()(Code)
This method is used for traversing nodes after the first stage of compilation.



setNext
public void setNext(AbstractSet next)(Code)
Sets next abstract set
Parameters:
  next - The next to set.



setType
protected void setType(int type)(Code)



toString
public String toString()(Code)



Methods inherited from java.lang.Object
protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object object)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final public Class<? extends Object> getClass()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
final public void notify()(Code)(Java Doc)
final public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final public void wait(long millis, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait(long millis) 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.