Java Doc for Money.java in  » Groupware » hipergate » com » knowgate » math » 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 » Groupware » hipergate » com.knowgate.math 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.lang.Number
      java.math.BigDecimal
         com.knowgate.math.Money

Money
public class Money extends BigDecimal (Code)

Combination of BigDecimal with Currency Sign

This class handles money amounts that include a currency sign
author:
   Sergio Montoro Ten
version:
   1.0



Constructor Summary
public  Money(Money oVal)
    
public  Money(String sVal, CurrencyCode oCur)
    
public  Money(String sVal, String sCur)
    
public  Money(double dVal, CurrencyCode oCur)
    
public  Money(double dVal, String sCur)
    
public  Money(BigDecimal oVal, CurrencyCode oCur)
    
public  Money(BigDecimal oVal, String sCur)
    
public  Money(BigInteger oVal, CurrencyCode oCur)
    
public  Money(BigInteger oVal, String sCur)
    

Method Summary
public  MoneyconvertTo(CurrencyCode oTarget, BigDecimal oRatio)
    
public  CurrencyCodecurrencyCode()
    
public  Stringformat(String sLanguage, String sCountry)
    
public static  booleanisMoney(String sVal)
    
public static  Moneyparse(String sVal)
    
public  Moneyround2()
    
public  StringtoString()
    


Constructor Detail
Money
public Money(Money oVal)(Code)



Money
public Money(String sVal, CurrencyCode oCur) throws NumberFormatException(Code)
Constructor
Parameters:
  sVal - String Numeric value in US decimal format (using dot as decimal delimiter)
Parameters:
  oCur - CurrencyCode
throws:
  NumberFormatException -



Money
public Money(String sVal, String sCur) throws NumberFormatException, IllegalArgumentException(Code)
Constructor
Parameters:
  sVal - String Numeric value in US decimal format (using dot as decimal delimiter)
Parameters:
  sCur - String Currency alphanumeric code {"USD", "EUR", etc.}
throws:
  NumberFormatException -
throws:
  IllegalArgumentException -



Money
public Money(double dVal, CurrencyCode oCur)(Code)
Constructor
Parameters:
  dVal - double
Parameters:
  oCur - CurrencyCode



Money
public Money(double dVal, String sCur) throws IllegalArgumentException(Code)
Constructor
Parameters:
  dVal - double
Parameters:
  sCur - String Currency alphanumeric code {"USD", "EUR", etc.}
throws:
  IllegalArgumentException -



Money
public Money(BigDecimal oVal, CurrencyCode oCur)(Code)



Money
public Money(BigDecimal oVal, String sCur)(Code)



Money
public Money(BigInteger oVal, CurrencyCode oCur)(Code)



Money
public Money(BigInteger oVal, String sCur)(Code)




Method Detail
convertTo
public Money convertTo(CurrencyCode oTarget, BigDecimal oRatio) throws NullPointerException(Code)

Convert this money to another currency


Parameters:
  oTarget - Target CurrencyCode
Parameters:
  oRatio - BigDecimal Conversion ratio Money if this CurrencyCode is the same as oTargetthen this is returned without any modification,if if this CurrencyCode is different from oTargetthen the returned value is this multiplied by oRatio.
throws:
  NullPointerException - if oTarget is null



currencyCode
public CurrencyCode currencyCode()(Code)



format
public String format(String sLanguage, String sCountry)(Code)
Format a BigDecimal as a String following the rules for an specific language and country
Parameters:
  sLanguage - String ISO-639 two letter language code
Parameters:
  sCountry - String ISO-3166 two leter country code String



isMoney
public static boolean isMoney(String sVal)(Code)



parse
public static Money parse(String sVal) throws NullPointerException, IllegalArgumentException, NumberFormatException(Code)



round2
public Money round2()(Code)
Rounds a BigDecimal value to two decimals BigDecimal



toString
public String toString()(Code)



Fields inherited from java.math.BigDecimal
final public static BigDecimal ONE(Code)(Java Doc)
final public static int ROUND_CEILING(Code)(Java Doc)
final public static int ROUND_DOWN(Code)(Java Doc)
final public static int ROUND_FLOOR(Code)(Java Doc)
final public static int ROUND_HALF_DOWN(Code)(Java Doc)
final public static int ROUND_HALF_EVEN(Code)(Java Doc)
final public static int ROUND_HALF_UP(Code)(Java Doc)
final public static int ROUND_UNNECESSARY(Code)(Java Doc)
final public static int ROUND_UP(Code)(Java Doc)
final public static BigDecimal TEN(Code)(Java Doc)
final public static BigDecimal ZERO(Code)(Java Doc)

Methods inherited from java.math.BigDecimal
public BigDecimal abs()(Code)(Java Doc)
public BigDecimal abs(MathContext mc)(Code)(Java Doc)
public BigDecimal add(BigDecimal augend)(Code)(Java Doc)
public BigDecimal add(BigDecimal augend, MathContext mc)(Code)(Java Doc)
public byte byteValueExact()(Code)(Java Doc)
public int compareTo(BigDecimal val)(Code)(Java Doc)
public BigDecimal divide(BigDecimal divisor, int scale, int roundingMode)(Code)(Java Doc)
public BigDecimal divide(BigDecimal divisor, int scale, RoundingMode roundingMode)(Code)(Java Doc)
public BigDecimal divide(BigDecimal divisor, int roundingMode)(Code)(Java Doc)
public BigDecimal divide(BigDecimal divisor, RoundingMode roundingMode)(Code)(Java Doc)
public BigDecimal divide(BigDecimal divisor)(Code)(Java Doc)
public BigDecimal divide(BigDecimal divisor, MathContext mc)(Code)(Java Doc)
public BigDecimal[] divideAndRemainder(BigDecimal divisor)(Code)(Java Doc)
public BigDecimal[] divideAndRemainder(BigDecimal divisor, MathContext mc)(Code)(Java Doc)
public BigDecimal divideToIntegralValue(BigDecimal divisor)(Code)(Java Doc)
public BigDecimal divideToIntegralValue(BigDecimal divisor, MathContext mc)(Code)(Java Doc)
public double doubleValue()(Code)(Java Doc)
public boolean equals(Object x)(Code)(Java Doc)
public float floatValue()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
public int intValue()(Code)(Java Doc)
public int intValueExact()(Code)(Java Doc)
public long longValue()(Code)(Java Doc)
public long longValueExact()(Code)(Java Doc)
public BigDecimal max(BigDecimal val)(Code)(Java Doc)
public BigDecimal min(BigDecimal val)(Code)(Java Doc)
public BigDecimal movePointLeft(int n)(Code)(Java Doc)
public BigDecimal movePointRight(int n)(Code)(Java Doc)
public BigDecimal multiply(BigDecimal multiplicand)(Code)(Java Doc)
public BigDecimal multiply(BigDecimal multiplicand, MathContext mc)(Code)(Java Doc)
public BigDecimal negate()(Code)(Java Doc)
public BigDecimal negate(MathContext mc)(Code)(Java Doc)
public BigDecimal plus()(Code)(Java Doc)
public BigDecimal plus(MathContext mc)(Code)(Java Doc)
public BigDecimal pow(int n)(Code)(Java Doc)
public BigDecimal pow(int n, MathContext mc)(Code)(Java Doc)
public int precision()(Code)(Java Doc)
public BigDecimal remainder(BigDecimal divisor)(Code)(Java Doc)
public BigDecimal remainder(BigDecimal divisor, MathContext mc)(Code)(Java Doc)
public BigDecimal round(MathContext mc)(Code)(Java Doc)
public int scale()(Code)(Java Doc)
public BigDecimal scaleByPowerOfTen(int n)(Code)(Java Doc)
public BigDecimal setScale(int newScale, RoundingMode roundingMode)(Code)(Java Doc)
public BigDecimal setScale(int newScale, int roundingMode)(Code)(Java Doc)
public BigDecimal setScale(int newScale)(Code)(Java Doc)
public short shortValueExact()(Code)(Java Doc)
public int signum()(Code)(Java Doc)
public BigDecimal stripTrailingZeros()(Code)(Java Doc)
public BigDecimal subtract(BigDecimal subtrahend)(Code)(Java Doc)
public BigDecimal subtract(BigDecimal subtrahend, MathContext mc)(Code)(Java Doc)
public BigInteger toBigInteger()(Code)(Java Doc)
public BigInteger toBigIntegerExact()(Code)(Java Doc)
public String toEngineeringString()(Code)(Java Doc)
public String toPlainString()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
public BigDecimal ulp()(Code)(Java Doc)
public BigInteger unscaledValue()(Code)(Java Doc)
public static BigDecimal valueOf(long unscaledVal, int scale)(Code)(Java Doc)
public static BigDecimal valueOf(long val)(Code)(Java Doc)
public static BigDecimal valueOf(double val)(Code)(Java Doc)

Methods inherited from java.lang.Number
public byte byteValue()(Code)(Java Doc)
abstract public double doubleValue()(Code)(Java Doc)
abstract public float floatValue()(Code)(Java Doc)
abstract public int intValue()(Code)(Java Doc)
abstract public long longValue()(Code)(Java Doc)
public short shortValue()(Code)(Java Doc)

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.