Java Doc for StringOps.java in  » IDE » DrJava » edu » rice » cs » 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 » IDE » DrJava » edu.rice.cs.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   edu.rice.cs.util.StringOps

StringOps
abstract public class StringOps (Code)
A class to provide some convenient String operations as static methods. It's abstract to prevent (useless) instantiation, though it can be subclassed to provide convenient namespace importation of its methods.
version:
   $Id: StringOps.java 4255 2007-08-28 19:17:37Z mgricken $


Field Summary
final public static  StringEOL
    


Method Summary
public static  StringconvertToLiteral(String s)
     Converts the given string to a valid Java string literal.
public static  StringencodeHTML(String s)
     Encode &, <, > and newlines as HTML entities.
public static  Pair<Integer, Integer>getOffsetAndLength(String fullString, int startRow, int startCol, int endRow, int endCol)
     Gets the offset and length equivalent to the given pairs start and end row-col.
Parameters:
  fullString - the string in which to compute the offset/length
Parameters:
  startRow - the row on which the error starts, starting at one for the first row
Parameters:
  startCol - the col on which the error starts, starting at one for the first column
Parameters:
  endRow - the row on which the error ends.
public static  StringgetSimpleName(Class c)
     Returns the simple class name.
public static  StringgetStackTrace(Throwable t)
     Gets the stack trace of the given Throwable as a String.
public static  StringgetStackTrace()
     Gets the stack trace of the current code.
public static  booleanisAnonymousClass(Class c)
     Returns true if the class is an anonymous inner class.
public static  booleanisAsciiDigit(char c)
     Character.isDigit answers true to some non-ascii digits.
public static  booleanisMemberClass(Class c)
     Returns true if the class is a member class.
public static  StringmemSizeToString(long l)
     Return a string representing the approximate amount of memory specified in bytes.
public static  Stringreplace(String fullString, String toReplace, String replacement)
     Takes theString fullString and replaces all instances of toReplace with replacement.
public static  StringtoString(long[] a)
     This works just like java.util.Arrays.toString in Java 5.0 but is not version-specific.
public static  StringtoString(int[] a)
     This works just like java.util.Arrays.toString in Java 5.0 but is not version-specific.
public static  StringtoString(short[] a)
     This works just like java.util.Arrays.toString in Java 5.0 but is not version-specific.
public static  StringtoString(char[] a)
     This works just like java.util.Arrays.toString in Java 5.0 but is not version-specific.
public static  StringtoString(byte[] a)
     This works just like java.util.Arrays.toString in Java 5.0 but is not version-specific.
public static  StringtoString(boolean[] a)
     This works just like java.util.Arrays.toString in Java 5.0 but is not version-specific.
public static  StringtoString(float[] a)
     This works just like java.util.Arrays.toString in Java 5.0 but is not version-specific.
public static  StringtoString(double[] a)
     This works just like java.util.Arrays.toString in Java 5.0 but is not version-specific.
public static  StringtoString(Object[] a)
     This works just like java.util.Arrays.toString in Java 5.0 but is not version-specific.

Field Detail
EOL
final public static String EOL(Code)





Method Detail
convertToLiteral
public static String convertToLiteral(String s)(Code)
Converts the given string to a valid Java string literal. All back slashes, quotes, new-lines, and tabs are converted to their escap character form, and the sourounding quotes are added.
Parameters:
  s - the normal string to turn into a string literal the valid Java string literal



encodeHTML
public static String encodeHTML(String s)(Code)
Encode &, <, > and newlines as HTML entities.
Parameters:
  s - string to encode encoded string



getOffsetAndLength
public static Pair<Integer, Integer> getOffsetAndLength(String fullString, int startRow, int startCol, int endRow, int endCol)(Code)
Gets the offset and length equivalent to the given pairs start and end row-col.
Parameters:
  fullString - the string in which to compute the offset/length
Parameters:
  startRow - the row on which the error starts, starting at one for the first row
Parameters:
  startCol - the col on which the error starts, starting at one for the first column
Parameters:
  endRow - the row on which the error ends. Equals the startRow for one-line errors
Parameters:
  endCol - the character position on which the error ends.Equals the startCol for one-character errors a Pair of which the first is the offset, the second is the length



getSimpleName
public static String getSimpleName(Class c)(Code)
Returns the simple class name. This works just like Class.getSimpleName() in Java 5.0 but is not version-specific.
Parameters:
  c - class for which to get the simple name simple name



getStackTrace
public static String getStackTrace(Throwable t)(Code)
Gets the stack trace of the given Throwable as a String.
Parameters:
  t - the throwable object for which to get the stack trace the stack trace of the given Throwable



getStackTrace
public static String getStackTrace()(Code)
Gets the stack trace of the current code. Does not include this method. the stack trace for the current code



isAnonymousClass
public static boolean isAnonymousClass(Class c)(Code)
Returns true if the class is an anonymous inner class. This works just like Class.isAnonymousClass() in Java 5.0 but is not version-specific.
Parameters:
  c - class to check true if anonymous inner class



isAsciiDigit
public static boolean isAsciiDigit(char c)(Code)
Character.isDigit answers true to some non-ascii digits. This one does not.



isMemberClass
public static boolean isMemberClass(Class c)(Code)
Returns true if the class is a member class. This works just like Class.isMemberClass() in Java 5.0 but is not version-specific.
Parameters:
  c - class to check true if member class



memSizeToString
public static String memSizeToString(long l)(Code)
Return a string representing the approximate amount of memory specified in bytes.
Parameters:
  l - memory in bytes string approximating the amount of memory



replace
public static String replace(String fullString, String toReplace, String replacement)(Code)
Takes theString fullString and replaces all instances of toReplace with replacement. TODO: deprecate and used corresponding String method added in Java 5.0.



toString
public static String toString(long[] a)(Code)
This works just like java.util.Arrays.toString in Java 5.0 but is not version-specific.



toString
public static String toString(int[] a)(Code)
This works just like java.util.Arrays.toString in Java 5.0 but is not version-specific.



toString
public static String toString(short[] a)(Code)
This works just like java.util.Arrays.toString in Java 5.0 but is not version-specific.



toString
public static String toString(char[] a)(Code)
This works just like java.util.Arrays.toString in Java 5.0 but is not version-specific.



toString
public static String toString(byte[] a)(Code)
This works just like java.util.Arrays.toString in Java 5.0 but is not version-specific.



toString
public static String toString(boolean[] a)(Code)
This works just like java.util.Arrays.toString in Java 5.0 but is not version-specific.



toString
public static String toString(float[] a)(Code)
This works just like java.util.Arrays.toString in Java 5.0 but is not version-specific.



toString
public static String toString(double[] a)(Code)
This works just like java.util.Arrays.toString in Java 5.0 but is not version-specific.



toString
public static String toString(Object[] a)(Code)
This works just like java.util.Arrays.toString in Java 5.0 but is not version-specific.



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.