Java Doc for UtilityContext.java in  » Template-Engine » Tea » com » go » tea » runtime » 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 » Template Engine » Tea » com.go.tea.runtime 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.go.tea.runtime.UtilityContext

All known Subclasses:   com.go.tea.runtime.DefaultContext,
UtilityContext
public interface UtilityContext extends Context(Code)
Extends the basic context to provide generic utility functions that most templates will need to use for formatting.
author:
   Brian S O'Neill
version:
   12 , 9/07/00




Method Summary
public  Stringcardinal(Long n)
     A function that converts an integer to a cardinal value.
public  Stringcardinal(long n)
     A function that converts an integer to a cardinal value.
public  java.util.DatecurrentDate()
     Returns a Date object with the current date and time.
public  booleanendsWith(String str, String suffix)
     Tests if the given string ends with the given suffix.
public  int[]find(String str, String search)
     Finds the indices for each occurrence of the given search string in the source string.
public  int[]find(String str, String search, int fromIndex)
     Finds the indices for each occurrence of the given search string in the source string, starting from the given index.
public  intfindFirst(String str, String search)
     Finds the index of the first occurrence of the given search string in the source string, or -1 if not found.
public  intfindFirst(String str, String search, int fromIndex)
     Finds the index of the first occurrence of the given search string in the source string, starting from the given index, or -1 if not found.
public  intfindLast(String str, String search)
     Finds the index of the last occurrence of the given search string in the source string, or -1 if not found.
public  intfindLast(String str, String search, int fromIndex)
     Finds the index of the last occurrence of the given search string in the source string, starting from the given index, or -1 if not found.
public  Stringordinal(Long n)
     A function that converts an integer to an ordinal value.
public  Stringordinal(long n)
     A function that converts an integer to an ordinal value.
public  Stringreplace(String source, String pattern, String replacement)
     Replaces all exact matches of the given pattern in the source string with the provided replacement.
Parameters:
  source - the source string
Parameters:
  pattern - the simple string pattern to search for
Parameters:
  replacement - the string to use for replacing matched patterns.
public  Stringreplace(String source, String pattern, String replacement, int fromIndex)
     Replaces all exact matches of the given pattern in the source string with the provided replacement, starting from the given index.
public  Stringreplace(String source, java.util.Map patternReplacements)
     Applies string replacements using the pattern-replacement pairs provided by the given map (associative array).
public  StringreplaceFirst(String source, String pattern, String replacement)
     Replaces the first exact match of the given pattern in the source string with the provided replacement.
public  StringreplaceFirst(String source, String pattern, String replacement, int fromIndex)
     Replaces the first exact match of the given pattern in the source string with the provided replacement, starting from the given index.
public  StringreplaceLast(String source, String pattern, String replacement)
     Replaces the last exact match of the given pattern in the source string with the provided replacement.
public  StringreplaceLast(String source, String pattern, String replacement, int fromIndex)
     Replaces the last exact match of the given pattern in the source string with the provided replacement, starting from the given index.
public  StringshortOrdinal(Long n)
     A function that converts an integer to a short ordinal value.
public  StringshortOrdinal(long n)
     A function that converts an integer to a short ordinal value.
public  booleanstartsWith(String str, String prefix)
     Tests if the given string starts with the given prefix.
public  Stringsubstring(String str, int startIndex)
     Returns the trailing end of the given string, starting from the given index.
public  Stringsubstring(String str, int startIndex, int endIndex)
     Returns a sub-portion of the given string for the characters that are at or after the starting index, and are before the end index.
public  StringtoLowerCase(String str)
     Converts all the characters in the given string to lowercase.
public  StringtoUpperCase(String str)
     Converts all the characters in the given string to uppercase.
public  Stringtrim(String str)
     Trims all leading and trailing whitespace characters from the given string.
public  StringtrimLeading(String str)
     Trims all leading whitespace characters from the given string.
public  StringtrimTrailing(String str)
     Trims all trailing whitespace characters from the given string.



Method Detail
cardinal
public String cardinal(Long n)(Code)
A function that converts an integer to a cardinal value. i.e. one, two, three etc.
Parameters:
  n - the number to convert a String containing the cardinal value of the specified number



cardinal
public String cardinal(long n)(Code)
A function that converts an integer to a cardinal value. i.e. one, two, three etc.
Parameters:
  n - the number to convert a String containing the cardinal value of the specified number



currentDate
public java.util.Date currentDate()(Code)
Returns a Date object with the current date and time.



endsWith
public boolean endsWith(String str, String suffix)(Code)
Tests if the given string ends with the given suffix. Returns true if the given string ends with the given suffix.
Parameters:
  str - the source string
Parameters:
  suffix - the suffix to test for true if the given string ends with the given suffix



find
public int[] find(String str, String search)(Code)
Finds the indices for each occurrence of the given search string in the source string. Returns an array of indices, which is empty if the search string wasn't found
Parameters:
  str - the source string
Parameters:
  search - the string to search for an array of indices, which is empty if the search string wasn't found



find
public int[] find(String str, String search, int fromIndex)(Code)
Finds the indices for each occurrence of the given search string in the source string, starting from the given index.
Parameters:
  str - the source string
Parameters:
  search - the string to search for
Parameters:
  fromIndex - index to start the find an array of indices, which is empty if the search string wasn't found



findFirst
public int findFirst(String str, String search)(Code)
Finds the index of the first occurrence of the given search string in the source string, or -1 if not found.
Parameters:
  str - the source string
Parameters:
  search - the string to search for the start index of the found string or -1 if not found



findFirst
public int findFirst(String str, String search, int fromIndex)(Code)
Finds the index of the first occurrence of the given search string in the source string, starting from the given index, or -1 if not found.
Parameters:
  str - the source string
Parameters:
  search - the string to search for
Parameters:
  fromIndex - index to start the find the start index of the found string or -1 if not found



findLast
public int findLast(String str, String search)(Code)
Finds the index of the last occurrence of the given search string in the source string, or -1 if not found.
Parameters:
  str - the source string
Parameters:
  search - the string to search for the start index of the found string or -1 if not found



findLast
public int findLast(String str, String search, int fromIndex)(Code)
Finds the index of the last occurrence of the given search string in the source string, starting from the given index, or -1 if not found.
Parameters:
  str - the source string
Parameters:
  search - the string to search for
Parameters:
  fromIndex - optional index to start the find the start index of the found string or -1 if not found



ordinal
public String ordinal(Long n)(Code)
A function that converts an integer to an ordinal value. i.e. first, second, third etc.
Parameters:
  n - the number to convert a String containing the ordinal value of the specified number



ordinal
public String ordinal(long n)(Code)
A function that converts an integer to an ordinal value. i.e. first, second, third etc.
Parameters:
  n - the number to convert a String containing the ordinal value of the specified number



replace
public String replace(String source, String pattern, String replacement)(Code)
Replaces all exact matches of the given pattern in the source string with the provided replacement.
Parameters:
  source - the source string
Parameters:
  pattern - the simple string pattern to search for
Parameters:
  replacement - the string to use for replacing matched patterns. the string with any replacements applied.



replace
public String replace(String source, String pattern, String replacement, int fromIndex)(Code)
Replaces all exact matches of the given pattern in the source string with the provided replacement, starting from the given index.
Parameters:
  source - the source string
Parameters:
  pattern - the simple string pattern to search for
Parameters:
  replacement - the string to use for replacing matched patterns.
Parameters:
  fromIndex - index to start the replace the string with any replacements applied.



replace
public String replace(String source, java.util.Map patternReplacements)(Code)
Applies string replacements using the pattern-replacement pairs provided by the given map (associative array). The longest matching pattern is used for selecting an appropriate replacement.
Parameters:
  source - the source string
Parameters:
  patternReplacements - pattern-replacement pairs



replaceFirst
public String replaceFirst(String source, String pattern, String replacement)(Code)
Replaces the first exact match of the given pattern in the source string with the provided replacement.
Parameters:
  source - the source string
Parameters:
  pattern - the simple string pattern to search for
Parameters:
  replacement - the string to use for replacing matched patterns the string with any replacements applied



replaceFirst
public String replaceFirst(String source, String pattern, String replacement, int fromIndex)(Code)
Replaces the first exact match of the given pattern in the source string with the provided replacement, starting from the given index.
Parameters:
  source - the source string
Parameters:
  pattern - the simple string pattern to search for
Parameters:
  replacement - the string to use for replacing matched patterns
Parameters:
  fromIndex - index to start the replace the string with any replacements applied



replaceLast
public String replaceLast(String source, String pattern, String replacement)(Code)
Replaces the last exact match of the given pattern in the source string with the provided replacement.
Parameters:
  source - the source string
Parameters:
  pattern - the simple string pattern to search for
Parameters:
  replacement - the string to use for replacing matched patterns the string with any replacements applied



replaceLast
public String replaceLast(String source, String pattern, String replacement, int fromIndex)(Code)
Replaces the last exact match of the given pattern in the source string with the provided replacement, starting from the given index.
Parameters:
  source - the source string
Parameters:
  pattern - the simple string pattern to search for
Parameters:
  replacement - the string to use for replacing matched patterns
Parameters:
  fromIndex - index to start the replace the string with any replacements applied



shortOrdinal
public String shortOrdinal(Long n)(Code)
A function that converts an integer to a short ordinal value. i.e. 1st, 2nd, 3rd etc.
Parameters:
  n - the number to convert a String containing the short ordinal value of the specified number



shortOrdinal
public String shortOrdinal(long n)(Code)
A function that converts an integer to a short ordinal value. i.e. 1st, 2nd, 3rd etc.
Parameters:
  n - the number to convert a String containing the short ordinal value of the specified number



startsWith
public boolean startsWith(String str, String prefix)(Code)
Tests if the given string starts with the given prefix. Returns true if the given string starts with the given prefix.
Parameters:
  str - the source string
Parameters:
  prefix - the prefix to test for true if the given string starts with the given prefix



substring
public String substring(String str, int startIndex)(Code)
Returns the trailing end of the given string, starting from the given index.
Parameters:
  str - the source string
Parameters:
  startIndex - the start index, inclusive the specified substring.



substring
public String substring(String str, int startIndex, int endIndex)(Code)
Returns a sub-portion of the given string for the characters that are at or after the starting index, and are before the end index.
Parameters:
  str - the source string
Parameters:
  startIndex - the start index, inclusive
Parameters:
  endIndex - the ending index, exclusive the specified substring.



toLowerCase
public String toLowerCase(String str)(Code)
Converts all the characters in the given string to lowercase.
Parameters:
  str - the string to convert the string converted to lowercase



toUpperCase
public String toUpperCase(String str)(Code)
Converts all the characters in the given string to uppercase.
Parameters:
  str - the string to convert the string converted to uppercase



trim
public String trim(String str)(Code)
Trims all leading and trailing whitespace characters from the given string.
Parameters:
  str - the string to trim the trimmed string



trimLeading
public String trimLeading(String str)(Code)
Trims all leading whitespace characters from the given string.
Parameters:
  str - the string to trim the trimmed string



trimTrailing
public String trimTrailing(String str)(Code)
Trims all trailing whitespace characters from the given string.
Parameters:
  str - the string to trim the trimmed string



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