Java Doc for StringFunctions.java in  » Development » JoSQL » org » josql » functions » 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 » Development » JoSQL » org.josql.functions 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.josql.functions.AbstractFunctionHandler
      org.josql.functions.StringFunctions

StringFunctions
public class StringFunctions extends AbstractFunctionHandler (Code)
This class holds functions that operate on strings in some way.


Field Summary
final public static  StringHANDLER_ID
    


Method Summary
public  Listgrep(File f, String s, boolean ignoreCase)
     grep through a file, line by line, and determine what matches there are to the nominated String.
public  Listgrep(File f, String s)
     grep through a file, line by line, and determine what matches there are to the nominated String.
public  doublelastIndexOf(Object o, Object i)
     A thinly veiled wrapper around the String.lastIndexOf(String) method. Both o and i are converted to Strings and then the "lastIndexoOf" method is called on o with i as the argument.
public  doublelength(Object o)
    
public  booleanregexp(Object o, String re)
     Match a regular expression against the object passed in.
Parameters:
  o - The object to match against, toString is called on the object.
Parameters:
  re - The regular expression to match.
public  booleanregexp(Object o, String re, String instName)
     Match a regular expression against the object passed in using the specified regular expression library, pre-defined library names can be found in: RegExpFactory .
Parameters:
  o - The object to match against, toString is called on the object.
Parameters:
  re - The regular expression to match.
Parameters:
  instName - The name of the regular expression library to use.
public  Listrgrep(File f, String regexp, String instName)
     grep through a file, line by line, and determine what matches there are to the nominated regular expression using the specified regular expression implementation.
public  Listrgrep(File f, String regexp)
     grep through a file, line by line, and determine what matches there are to the nominated regular expression.
public  StringsubStr(Object o, double f)
     Return a substring of the passed in object (in a string form).
public  StringsubStr(Object o, double f, double t)
     A function to return a substring of a String.
public  Stringtrim(Object o, Object v)
     Given a string trim the passed in string from the front and end, set v to null to have just whitespace trimmed.

Field Detail
HANDLER_ID
final public static String HANDLER_ID(Code)





Method Detail
grep
public List grep(File f, String s, boolean ignoreCase) throws QueryExecutionException(Code)
grep through a file, line by line, and determine what matches there are to the nominated String. Return a List of FileMatch objects.
Parameters:
  f - The File to match against.
Parameters:
  s - The string to match.
Parameters:
  ignoreCase - If set to true then the case of the line and string to match are ignored. The List of FileMatch objects.



grep
public List grep(File f, String s) throws QueryExecutionException(Code)
grep through a file, line by line, and determine what matches there are to the nominated String. Return a List of FileMatch objects.
Parameters:
  f - The File to match against.
Parameters:
  s - The string to match. The List of FileMatch objects.



lastIndexOf
public double lastIndexOf(Object o, Object i)(Code)
A thinly veiled wrapper around the String.lastIndexOf(String) method. Both o and i are converted to Strings and then the "lastIndexoOf" method is called on o with i as the argument.
Parameters:
  o - The string to search.
Parameters:
  i - The string to match. The last index of i within o. If o is null then-1 is returned. If i is null then -1 is returned.



length
public double length(Object o)(Code)



regexp
public boolean regexp(Object o, String re) throws QueryExecutionException(Code)
Match a regular expression against the object passed in.
Parameters:
  o - The object to match against, toString is called on the object.
Parameters:
  re - The regular expression to match. true if the expression matches.
throws:
  QueryExecutionException - If the match cannot be performed, or if there is no suitableregular expression library available to the RegExpFactory.



regexp
public boolean regexp(Object o, String re, String instName) throws QueryExecutionException(Code)
Match a regular expression against the object passed in using the specified regular expression library, pre-defined library names can be found in: RegExpFactory .
Parameters:
  o - The object to match against, toString is called on the object.
Parameters:
  re - The regular expression to match.
Parameters:
  instName - The name of the regular expression library to use. true if the expression matches.
throws:
  QueryExecutionException - If the match cannot be performed, or if the instName regular expression library is not available to the RegExpFactory.



rgrep
public List rgrep(File f, String regexp, String instName) throws QueryExecutionException(Code)
grep through a file, line by line, and determine what matches there are to the nominated regular expression using the specified regular expression implementation. Return a List of FileMatch objects.
Parameters:
  f - The File to match against.
Parameters:
  regexp - The regular expression to match against each line. This will use thedefault regular expression library. In this case the location of the match(i.e. FileMatch.getColumn) will be -1 since the regular expressionhandling does not support location matching. Also, FileMatch.getStringwill contain the regular expression used.
Parameters:
  instName - The instance name to use. The List of FileMatch objects.
throws:
  QueryExecutionException - If the default regular expression implementation is not available or if the file cannot be read.



rgrep
public List rgrep(File f, String regexp) throws QueryExecutionException(Code)
grep through a file, line by line, and determine what matches there are to the nominated regular expression. Return a List of FileMatch objects.
Parameters:
  f - The File to match against.
Parameters:
  regexp - The regular expression to match against each line. This will use thedefault regular expression library. In this case the location of the match(i.e. FileMatch.getColumn) will be -1 since the regular expressionhandling does not support location matching. Also, FileMatch.getStringwill contain the regular expression used. The List of FileMatch objects.
throws:
  QueryExecutionException - If the default regular expression implementation is not available or if the file cannot be read.



subStr
public String subStr(Object o, double f)(Code)
Return a substring of the passed in object (in a string form). See StringFunctions.subStr(Object,double,double) for the full details since this is just a thin-wrapper around that method with the t parameter set to -1.
Parameters:
  o - The object to convert to a string and return the substring.
Parameters:
  f - The start index. If this is set to 0 then the entire string is returned. The substring.



subStr
public String subStr(Object o, double f, double t)(Code)
A function to return a substring of a String. If the passed in object isn't a string then it is converted to a string before processing.
Parameters:
  o - The object to convert to a string and return the substring.
Parameters:
  f - The start index. If it's < 0 then "" is returned. If the start is out of range of the string then "" is returned.
Parameters:
  t - The end index. If it's > f then it is reset to -1. If it's -1 thenit's ignored and the substring from the start is used. If the end is greaterthan the length of the string then it is ignored. The substring.



trim
public String trim(Object o, Object v)(Code)
Given a string trim the passed in string from the front and end, set v to null to have just whitespace trimmed. Both are converted to strings first.
Parameters:
  o - The string to trim.
Parameters:
  v - The string to trim from the front and end. Set to null to just trimwhitespace. The trimmed string.



Fields inherited from org.josql.functions.AbstractFunctionHandler
protected Query q(Code)(Java Doc)

Methods inherited from org.josql.functions.AbstractFunctionHandler
public void setQuery(Query q)(Code)(Java Doc)

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.