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


java.lang.Object
   org.ofbiz.base.util.UtilFormatOut

UtilFormatOut
public class UtilFormatOut (Code)
General output formatting functions - mainly for helping in JSPs
author:
   David E. Jones
author:
   Andy Zeneski
version:
   $Revision: 1.6 $
since:
   2.0


Field Summary
final public static  Stringmodule
    
static  DecimalFormatpercentageDecimalFormat
    
static  DecimalFormatpriceDecimalFormat
    
static  DecimalFormatquantityDecimalFormat
    


Method Summary
public static  StringcheckEmpty(String string1, String string2)
     Returns the first passed String if not empty, otherwise the second if not empty, otherwise an empty but non-null String.
public static  StringcheckEmpty(String string1, String string2, String string3)
     Returns the first passed String if not empty, otherwise the second if not empty, otherwise the third if not empty, otherwise an empty but non-null String.
public static  StringcheckNull(String string1)
     Checks to see if the passed string is null, if it is returns an empty but non-null string.
public static  StringcheckNull(String string1, String string2)
     Returns the first passed String if not null, otherwise the second if not null, otherwise an empty but non-null String.
public static  StringcheckNull(String string1, String string2, String string3)
     Returns the first passed String if not null, otherwise the second if not null, otherwise the third if not null, otherwise an empty but non-null String.
public static  StringcheckNull(String string1, String string2, String string3, String string4)
     Returns the first passed String if not null, otherwise the second if not null, otherwise the third if not null, otherwise the fourth if not null, otherwise an empty but non-null String.
public static  StringdecodeQueryValue(String query)
    
public static  StringencodeQuery(String query)
    
public static  StringencodeQueryValue(String query)
    
public static  StringencodeXmlValue(String inString)
    
public static  StringformatCurrency(double price, String isoCode, Locale locale)
    
public static  StringformatCurrency(Double price, String isoCode, Locale locale)
    
public static  StringformatDate(java.sql.Timestamp timestamp)
    
public static  StringformatPaddedNumber(long number, int numericPadding)
    
public static  StringformatPaddingRemove(String original)
    
public static  StringformatPercentage(Double percentage)
    
public static  StringformatPercentage(double percentage)
    
public static  StringformatPrice(Double price)
    
public static  StringformatPrice(double price)
    
public static  StringformatQuantity(Long quantity)
    
public static  StringformatQuantity(long quantity)
    
public static  StringformatQuantity(Integer quantity)
    
public static  StringformatQuantity(int quantity)
    
public static  StringformatQuantity(Float quantity)
    
public static  StringformatQuantity(float quantity)
    
public static  StringformatQuantity(Double quantity)
    
public static  StringformatQuantity(double quantity)
    
public static  StringifNotEmpty(String base, String pre, String post)
     Returns pre + base + post if base String is not null or empty, otherwise an empty but non-null String.
public static  StringmakeString(Object obj1)
    
public static  StringreplaceString(String mainString, String oldString, String newString)
    
public static  StringsafeToString(Object obj)
    

Field Detail
module
final public static String module(Code)



percentageDecimalFormat
static DecimalFormat percentageDecimalFormat(Code)



priceDecimalFormat
static DecimalFormat priceDecimalFormat(Code)



quantityDecimalFormat
static DecimalFormat quantityDecimalFormat(Code)





Method Detail
checkEmpty
public static String checkEmpty(String string1, String string2)(Code)
Returns the first passed String if not empty, otherwise the second if not empty, otherwise an empty but non-null String.
Parameters:
  string1 - The first passed String
Parameters:
  string2 - The second passed String The first passed String if not empty, otherwise the second if not empty, otherwise an empty but non-null String



checkEmpty
public static String checkEmpty(String string1, String string2, String string3)(Code)
Returns the first passed String if not empty, otherwise the second if not empty, otherwise the third if not empty, otherwise an empty but non-null String.
Parameters:
  string1 - The first passed String
Parameters:
  string2 - The second passed String
Parameters:
  string3 - The third passed String The first passed String if not empty, otherwise the second if not empty, otherwise the third if not empty, otherwise an empty but non-null String



checkNull
public static String checkNull(String string1)(Code)
Checks to see if the passed string is null, if it is returns an empty but non-null string.
Parameters:
  string1 - The passed String The passed String if not null, otherwise an empty non-null String



checkNull
public static String checkNull(String string1, String string2)(Code)
Returns the first passed String if not null, otherwise the second if not null, otherwise an empty but non-null String.
Parameters:
  string1 - The first passed String
Parameters:
  string2 - The second passed String The first passed String if not null, otherwise the second if not null, otherwise an empty but non-null String



checkNull
public static String checkNull(String string1, String string2, String string3)(Code)
Returns the first passed String if not null, otherwise the second if not null, otherwise the third if not null, otherwise an empty but non-null String.
Parameters:
  string1 - The first passed String
Parameters:
  string2 - The second passed String
Parameters:
  string3 - The third passed String The first passed String if not null, otherwise the second if not null, otherwise the third if not null, otherwise an empty but non-null String



checkNull
public static String checkNull(String string1, String string2, String string3, String string4)(Code)
Returns the first passed String if not null, otherwise the second if not null, otherwise the third if not null, otherwise the fourth if not null, otherwise an empty but non-null String.
Parameters:
  string1 - The first passed String
Parameters:
  string2 - The second passed String
Parameters:
  string3 - The third passed String
Parameters:
  string4 - The fourth passed String The first passed String if not null, otherwise the second if not null, otherwise the third if not null, otherwise the fourth if not null, otherwise an empty but non-null String



decodeQueryValue
public static String decodeQueryValue(String query)(Code)
Decodes a single query value from an HTTP URL parameter, replacing %ASCII values with characters
Parameters:
  query - The encoded query value String The plain, decoded String



encodeQuery
public static String encodeQuery(String query)(Code)
Encodes an HTTP URL query String, replacing characters used for other things in HTTP URL query strings, but not touching the separator characters '?', '=', and '&'
Parameters:
  query - The plain query String The encoded String



encodeQueryValue
public static String encodeQueryValue(String query)(Code)
Encodes a single HTTP URL query value, replacing characters used for other things in HTTP URL query strings
Parameters:
  query - The plain query value String The encoded String



encodeXmlValue
public static String encodeXmlValue(String inString)(Code)
Encodes an XML string replacing the characters '<', '>', '"', ''', '&'
Parameters:
  inString - The plain value String The encoded String



formatCurrency
public static String formatCurrency(double price, String isoCode, Locale locale)(Code)
Formats a double into a properly formatted currency string based on isoCode and Locale
Parameters:
  price - The price double to be formatted
Parameters:
  isoCode - the currency ISO code
Parameters:
  locale - The Locale used to format the number A String with the formatted price



formatCurrency
public static String formatCurrency(Double price, String isoCode, Locale locale)(Code)
Formats a double into a properly formatted currency string based on isoCode and Locale
Parameters:
  price - The price Double to be formatted
Parameters:
  isoCode - the currency ISO code
Parameters:
  locale - The Locale used to format the number A String with the formatted price



formatDate
public static String formatDate(java.sql.Timestamp timestamp)(Code)
Formats a String timestamp into a nice string
Parameters:
  timestamp - String timestamp to be formatted A String with the formatted date/time



formatPaddedNumber
public static String formatPaddedNumber(long number, int numericPadding)(Code)



formatPaddingRemove
public static String formatPaddingRemove(String original)(Code)



formatPercentage
public static String formatPercentage(Double percentage)(Code)
Formats a Double representing a percentage into a string
Parameters:
  percentage - The percentage Double to be formatted A String with the formatted percentage



formatPercentage
public static String formatPercentage(double percentage)(Code)
Formats a double representing a percentage into a string
Parameters:
  percentage - The percentage double to be formatted A String with the formatted percentage



formatPrice
public static String formatPrice(Double price)(Code)
Formats a Double representing a price into a string
Parameters:
  price - The price Double to be formatted A String with the formatted price



formatPrice
public static String formatPrice(double price)(Code)
Formats a double representing a price into a string
Parameters:
  price - The price double to be formatted A String with the formatted price



formatQuantity
public static String formatQuantity(Long quantity)(Code)
Formats an Long representing a quantity into a string
Parameters:
  quantity - The quantity Long to be formatted A String with the formatted quantity



formatQuantity
public static String formatQuantity(long quantity)(Code)
Formats an int representing a quantity into a string
Parameters:
  quantity - The quantity long to be formatted A String with the formatted quantity



formatQuantity
public static String formatQuantity(Integer quantity)(Code)
Formats an Integer representing a quantity into a string
Parameters:
  quantity - The quantity Integer to be formatted A String with the formatted quantity



formatQuantity
public static String formatQuantity(int quantity)(Code)
Formats an int representing a quantity into a string
Parameters:
  quantity - The quantity int to be formatted A String with the formatted quantity



formatQuantity
public static String formatQuantity(Float quantity)(Code)
Formats a Float representing a quantity into a string
Parameters:
  quantity - The quantity Float to be formatted A String with the formatted quantity



formatQuantity
public static String formatQuantity(float quantity)(Code)
Formats a float representing a quantity into a string
Parameters:
  quantity - The quantity float to be formatted A String with the formatted quantity



formatQuantity
public static String formatQuantity(Double quantity)(Code)
Formats an Double representing a quantity into a string
Parameters:
  quantity - The quantity Double to be formatted A String with the formatted quantity



formatQuantity
public static String formatQuantity(double quantity)(Code)
Formats an double representing a quantity into a string
Parameters:
  quantity - The quantity double to be formatted A String with the formatted quantity



ifNotEmpty
public static String ifNotEmpty(String base, String pre, String post)(Code)
Returns pre + base + post if base String is not null or empty, otherwise an empty but non-null String.
Parameters:
  base - The base String
Parameters:
  pre - The pre String
Parameters:
  post - The post String pre + base + post if base String is not null or empty, otherwise an empty but non-null String.



makeString
public static String makeString(Object obj1)(Code)
Checks to see if the passed Object is null, if it is returns an empty but non-null string, otherwise calls toString() on the object
Parameters:
  obj1 - The passed Object The toString() of the passed Object if not null, otherwise an empty non-null String



replaceString
public static String replaceString(String mainString, String oldString, String newString)(Code)
Replaces all occurances of oldString in mainString with newString
Parameters:
  mainString - The original string
Parameters:
  oldString - The string to replace
Parameters:
  newString - The string to insert in place of the old mainString with all occurances of oldString replaced by newString



safeToString
public static String safeToString(Object obj)(Code)



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.