Java Doc for StringUtil.java in  » ERP-CRM-Financial » sakai » org » sakaiproject » util » 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 » ERP CRM Financial » sakai » org.sakaiproject.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.sakaiproject.util.StringUtil

StringUtil
public class StringUtil (Code)

StringUtil collects together some string utility classes.





Method Summary
public static  booleancontains(Collection stringCollection, String value)
    
public static  booleancontains(String[] stringCollection, String value)
    
public static  booleancontains(String[] stringCollection, String value, boolean ignoreCase)
     Determine if a String is contained in a String [], ignoring case or not as specified
Parameters:
  stringCollection - The String[] to scan
Parameters:
  value - The value to look for
Parameters:
  ignoreCase - if true, we will do the compare case insensitive.
public static  booleancontainsIgnoreCase(String target, String substring)
     Check if the target contains the substring anywhere, ignore case.
Parameters:
  target - The string to check.
Parameters:
  substring - The value to check for.
public static  booleancontainsIgnoreCase(Collection stringCollection, String value)
    
public static  booleancontainsIgnoreCase(String[] stringCollection, String value)
    
public static  booleandifferent(String a, String b)
     Compare two strings for differences, either may be null
Parameters:
  a - One String.
Parameters:
  b - The other String.
public static  booleandifferent(String a, String b, boolean ignoreCase)
     Compare two strings for differences, either may be null, ignore case if specified
Parameters:
  a - One String.
Parameters:
  b - The other String.
Parameters:
  ignoreCase - if true, we will do the compare case insensitive.
public static  booleandifferent(String[] a, String[] b)
     Compare two String[] for differences, either may be null
Parameters:
  a - One String[].
Parameters:
  b - The other String[].
public static  booleandifferent(byte[] a, byte[] b)
     Compare two byte[] for differences, either may be null
Parameters:
  a - One byte[].
Parameters:
  b - The other byte[].
public static  StringfullReference(String root, String relative)
     Create a full reference from a relative reference merged with a root reference.
Parameters:
  root - The root reference, which is the root of the full reference.
Parameters:
  relative - The relative reference, to add to the path of the root.
public static  Stringlimit(String value, int length)
     Limit the string to a certain number of characters, adding "..." if it was truncated
Parameters:
  value - The string to limit.
Parameters:
  length - the length to limit to (as an int).
public static  StringreferencePath(String ref)
     Compute the reference path (i.e.
public static  String[]split(String source, String splitter)
     Like jdk1.4's String.split...
public static  String[]splitFirst(String source, String splitter)
     Split the source into two strings at the first occurrence of the splitter Subsequent occurrences are not treated specially, and may be part of the second string.
Parameters:
  source - The string to split
Parameters:
  splitter - The string that forms the boundary between the two strings returned.
public static  StringtrimToNull(String value)
     Trim blanks, and if nothing left, make null.
Parameters:
  value - The string to trim.
public static  StringtrimToNullLower(String value)
     Trim blanks, and if nothing left, make null, else lowercase.
Parameters:
  value - The string to trim.
public static  StringtrimToZero(String value)
     Trim blanks, and assure there is a value, and it's not null.
Parameters:
  value - The string to trim.
public static  StringtrimToZeroLower(String value)
     Trim blanks, and assure there is a value, and it's not null, then lowercase.
Parameters:
  value - The string to trim.
public static  Stringunsplit(String[] parts, String splitter)
     Reverse the split operation.
public static  Stringunsplit(String[] parts, int index, int length, String splitter)
     Reverse the split operation.



Method Detail
contains
public static boolean contains(Collection stringCollection, String value)(Code)
Determine if a String is contained in a String Collection
Parameters:
  stringCollection - The collection of (String) to scan
Parameters:
  value - The value to look for true if the string was found



contains
public static boolean contains(String[] stringCollection, String value)(Code)
Determine if a String is contained in a String[]
Parameters:
  stringCollection - The String[] to scan
Parameters:
  value - The value to look for true if the string was found



contains
public static boolean contains(String[] stringCollection, String value, boolean ignoreCase)(Code)
Determine if a String is contained in a String [], ignoring case or not as specified
Parameters:
  stringCollection - The String[] to scan
Parameters:
  value - The value to look for
Parameters:
  ignoreCase - if true, we will do the compare case insensitive. true if the string was found



containsIgnoreCase
public static boolean containsIgnoreCase(String target, String substring)(Code)
Check if the target contains the substring anywhere, ignore case.
Parameters:
  target - The string to check.
Parameters:
  substring - The value to check for. true of the target contains the substring anywhere, ignore case, or false if it does not.



containsIgnoreCase
public static boolean containsIgnoreCase(Collection stringCollection, String value)(Code)
Determine if a String is contained in a String Collection, ignoring case
Parameters:
  stringCollection - The collection of (String) to scan
Parameters:
  value - The value to look for true if the string was found



containsIgnoreCase
public static boolean containsIgnoreCase(String[] stringCollection, String value)(Code)
Determine if a String is contained in a String [], ignoring case
Parameters:
  stringCollection - The String[] to scan
Parameters:
  value - The value to look for true if the string was found



different
public static boolean different(String a, String b)(Code)
Compare two strings for differences, either may be null
Parameters:
  a - One String.
Parameters:
  b - The other String. true if the strings are different, false if they are the same.



different
public static boolean different(String a, String b, boolean ignoreCase)(Code)
Compare two strings for differences, either may be null, ignore case if specified
Parameters:
  a - One String.
Parameters:
  b - The other String.
Parameters:
  ignoreCase - if true, we will do the compare case insensitive. true if the strings are different, false if they are the same.



different
public static boolean different(String[] a, String[] b)(Code)
Compare two String[] for differences, either may be null
Parameters:
  a - One String[].
Parameters:
  b - The other String[]. true if the String[]s are different, false if they are the same.



different
public static boolean different(byte[] a, byte[] b)(Code)
Compare two byte[] for differences, either may be null
Parameters:
  a - One byte[].
Parameters:
  b - The other byte[]. true if the byte[]s are different, false if they are the same.



fullReference
public static String fullReference(String root, String relative)(Code)
Create a full reference from a relative reference merged with a root reference.
Parameters:
  root - The root reference, which is the root of the full reference.
Parameters:
  relative - The relative reference, to add to the path of the root. A full reference from the root and relative references.



limit
public static String limit(String value, int length)(Code)
Limit the string to a certain number of characters, adding "..." if it was truncated
Parameters:
  value - The string to limit.
Parameters:
  length - the length to limit to (as an int). The limited string.



referencePath
public static String referencePath(String ref)(Code)
Compute the reference path (i.e. the container) for a given reference.
Parameters:
  ref - The reference string. The reference root for the given reference.



split
public static String[] split(String source, String splitter)(Code)
Like jdk1.4's String.split...



splitFirst
public static String[] splitFirst(String source, String splitter)(Code)
Split the source into two strings at the first occurrence of the splitter Subsequent occurrences are not treated specially, and may be part of the second string.
Parameters:
  source - The string to split
Parameters:
  splitter - The string that forms the boundary between the two strings returned. An array of two strings split from source by splitter.



trimToNull
public static String trimToNull(String value)(Code)
Trim blanks, and if nothing left, make null.
Parameters:
  value - The string to trim. value trimmed of blanks, and if nothing left, made null.



trimToNullLower
public static String trimToNullLower(String value)(Code)
Trim blanks, and if nothing left, make null, else lowercase.
Parameters:
  value - The string to trim. value trimmed of blanks, lower cased, and if nothing left, made null.



trimToZero
public static String trimToZero(String value)(Code)
Trim blanks, and assure there is a value, and it's not null.
Parameters:
  value - The string to trim. value trimmed of blanks, assuring it not to be null.



trimToZeroLower
public static String trimToZeroLower(String value)(Code)
Trim blanks, and assure there is a value, and it's not null, then lowercase.
Parameters:
  value - The string to trim. value trimmed of blanks, lower cased, assuring it not to be null.



unsplit
public static String unsplit(String[] parts, String splitter)(Code)
Reverse the split operation.
Parameters:
  parts - The parts to combine
Parameters:
  splitter - The between-parts text



unsplit
public static String unsplit(String[] parts, int index, int length, String splitter)(Code)
Reverse the split operation.
Parameters:
  parts - The parts to combine
Parameters:
  index - the index to the fist part to use
Parameters:
  length - the number of parts to use
Parameters:
  splitter - The between-parts text



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.