Java Doc for TypeConverter.java in  » Portal » uPortal_rel-2-6-1-GA » org » jasig » portal » lang » 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 » Portal » uPortal_rel 2 6 1 GA » org.jasig.portal.lang 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jasig.portal.lang.TypeConverter

TypeConverter
final public class TypeConverter (Code)
The TypeConverter class provides efficient and consistent static type converter utilities for the basic types.
author:
   Jan Nielsen
version:
   $Revision: 34761 $


Field Summary
final public static  StringFALSE
     Canonical string representation of false.
final public static  StringTRUE
     Canonical string representation of true.


Method Summary
final public static  booleanisInt(String value)
     Returns true if the value can be parsed to an int.
final public static  booleantoBoolean(String value)
     Returns the boolean value represented by the specified string, ignoring case.
final public static  bytetoByte(String value)
     Returns a signed decimal byte value.
final public static  chartoChar(String value)
     Returns the first character of the string.
final public static  doubletoDouble(String value)
     Returns a new double initialized to the value represented by the specified String, as performed by the valueOf method of class Double.
final public static  floattoFloat(String value)
     Returns a new float initialized to the value represented by the specified String, as performed by the valueOf method of class Double.
final public static  StringtoHexString(byte[] values)
     Returns a hexidecimal string representation of the specified byte array.
final public static  StringtoHexString(long value)
     Converts a long value to a hexidecimal string.
final public static  inttoInt(String value)
     Parses the string argument as a signed decimal integer.
final public static  longtoLong(String value)
     Parses the string argument as a signed long in the radix specified by the second argument.
final public static  shorttoShort(String value)
     Returns the short representation of the specified string.
final public static  StringtoString(boolean value)
     Returns a canonical String object representing the specified boolean.
final public static  StringtoString(byte value)
     Returns a string representation of the argument of radix 10.
final public static  StringtoString(char value)
     Returns a string representation of the argument.
final public static  StringtoString(short value)
     Returns a string representation of the specified short value of radix 10.
final public static  StringtoString(int value)
     Returns a string representation of the specified int.
final public static  StringtoString(long value)
     Returns a string representation of the specified long.
final public static  StringtoString(float value)
     Returns a string representation of the specified float.
final public static  StringtoString(double value)
     Returns a string representation of the specified double.

Field Detail
FALSE
final public static String FALSE(Code)
Canonical string representation of false.



TRUE
final public static String TRUE(Code)
Canonical string representation of true.





Method Detail
isInt
final public static boolean isInt(String value)(Code)
Returns true if the value can be parsed to an int.
Parameters:
  value - string representation of the int true if argument is an int;otherwise false



toBoolean
final public static boolean toBoolean(String value)(Code)
Returns the boolean value represented by the specified string, ignoring case. If the value is neither "true", nor "false" (ignoring case), an IllegalArgumentException is thrown.

Note: This implementation is different than the java.lang.Boolean implementation. The java.lang.Boolean treats null and any non-"true" value (ignoring case) as false, i.e., there is no validation of false values.
Parameters:
  value - string representation of a boolean value boolean value represented by the argument
throws:
  IllegalArgumentException - if value is (ignoring case)neither "true", nor "false"




toByte
final public static byte toByte(String value)(Code)
Returns a signed decimal byte value. The characters in the string must all be decimal digits, except that the first character may be an ASCII minus sign '-' ('\u002D') to indicate a negative value.
Parameters:
  value - string representation of a byte value byte value represented by the argument
throws:
  IllegalArgumentException - if argument is not a parseablebyte



toChar
final public static char toChar(String value)(Code)
Returns the first character of the string.
Parameters:
  value - string representation of the char char representation of the argument
throws:
  IllegalArgumentException - if value isnull or of zero length



toDouble
final public static double toDouble(String value)(Code)
Returns a new double initialized to the value represented by the specified String, as performed by the valueOf method of class Double.
Parameters:
  value - string representation of the long long representation of the argument
throws:
  IllegalArgumentException - if string does not contain aparseable long



toFloat
final public static float toFloat(String value)(Code)
Returns a new float initialized to the value represented by the specified String, as performed by the valueOf method of class Double.
Parameters:
  value - string representation of the long long representation of the argument
throws:
  IllegalArgumentException - if string does not contain aparseable long



toHexString
final public static String toHexString(byte[] values)(Code)
Returns a hexidecimal string representation of the specified byte array.
Parameters:
  values - byte array to be converted hexidecimal string representation of argument



toHexString
final public static String toHexString(long value)(Code)
Converts a long value to a hexidecimal string.
Parameters:
  value - long to be converted string representation of the long value



toInt
final public static int toInt(String value)(Code)
Parses the string argument as a signed decimal integer. The characters in the string must all be decimal digits, except that the first character may be an ASCII minus sign '-' ('\u002D') to indicate a negative value.
Parameters:
  value - string representation of the int int representation of the argument
throws:
  IllegalArgumentException - if string does not contain aparseable int



toLong
final public static long toLong(String value)(Code)
Parses the string argument as a signed long in the radix specified by the second argument. The characters in the string must all be digits of the specified radix (as determined by whether Character.digit returns a nonnegative value), except that the first character may be an ASCII minus sign '-' ('\u002d' to indicate a negative value. The resulting long value is returned. Note that neither L nor l is permitted to appear at the end of the string as a type indicator, as would be permitted in Java programming language source code.
Parameters:
  value - string representation of the long long representation of the argument
throws:
  IllegalArgumentException - if string does not contain aparseable long



toShort
final public static short toShort(String value)(Code)
Returns the short representation of the specified string. The characters in the string must all be decimal digits, except that the first character may be an ASCII minus sign '-' ('\u002D') to indicate a negative value.
Parameters:
  value - string representation of the short short representation of the argument
throws:
  IllegalArgumentException - if argument is not a parseableshort



toString
final public static String toString(boolean value)(Code)
Returns a canonical String object representing the specified boolean. If the value is true, the string "true" will be returned; if the value is false, the string "false".
Parameters:
  value - boolean value to be converted canonical string representation of theboolean value



toString
final public static String toString(byte value)(Code)
Returns a string representation of the argument of radix 10.
Parameters:
  value - byte value to be converted string respresentation of the argument



toString
final public static String toString(char value)(Code)
Returns a string representation of the argument. The result string of length 1 consisting solely of the specified char.
Parameters:
  value - char value to be converted string representation of the argument



toString
final public static String toString(short value)(Code)
Returns a string representation of the specified short value of radix 10.
Parameters:
  value - short value to be converted string representation of the argument



toString
final public static String toString(int value)(Code)
Returns a string representation of the specified int.
Parameters:
  value - int >value to be converted string representation of the argument



toString
final public static String toString(long value)(Code)
Returns a string representation of the specified long.
Parameters:
  value - long value to be converted string representation of the argument



toString
final public static String toString(float value)(Code)
Returns a string representation of the specified float.
Parameters:
  value - float value to be converted string representation of the argument



toString
final public static String toString(double value)(Code)
Returns a string representation of the specified double.
Parameters:
  value - double value to be converted string representation of the argument



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.