org.dasein.util
Class Money

java.lang.Object
  extended by org.dasein.util.Money
All Implemented Interfaces:
Serializable, Comparable<Money>

public class Money
extends Object
implements Comparable<Money>, Serializable

//TODO javadoc

Version:
1.0
Author:
Morgan Catlin [email protected]>.
See Also:
Serialized Form

Constructor Summary
Money(Currency curr, double val)
           
Money(Currency curr, Double val)
           
Money(Currency curr, long val)
           
Money(Currency curr, Long val)
           
Money(Currency curr, long whole, int part)
           
Money(Currency curr, Number whole, Number part)
           
Money(Locale loc, double val)
           
Money(Locale loc, Double val)
           
Money(Locale loc, long val)
           
Money(Locale loc, Long val)
           
Money(Locale loc, long whole, int part)
           
Money(Locale loc, Number whole, Number part)
           
 
Method Summary
 Money add(Money amt)
           
 int compareTo(Money other)
           
 boolean equals(Object ob)
           
 Currency getCurrency()
           
 int getFractionValue()
           
 String getString(Locale loc)
           
 double getValue()
           
 long getWholeValue()
           
 int hashCode()
           
 Money subtract(Money amt)
           
 String toString()
           
static Money valueOf(String str)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Money

public Money(Locale loc,
             long val)

Money

public Money(Currency curr,
             long val)

Money

public Money(Locale loc,
             Long val)

Money

public Money(Currency curr,
             Long val)

Money

public Money(Locale loc,
             double val)

Money

public Money(Currency curr,
             double val)

Money

public Money(Locale loc,
             Double val)

Money

public Money(Currency curr,
             Double val)

Money

public Money(Locale loc,
             long whole,
             int part)

Money

public Money(Currency curr,
             long whole,
             int part)

Money

public Money(Locale loc,
             Number whole,
             Number part)

Money

public Money(Currency curr,
             Number whole,
             Number part)
Method Detail

valueOf

public static Money valueOf(String str)

add

public Money add(Money amt)

compareTo

public int compareTo(Money other)
Specified by:
compareTo in interface Comparable<Money>

equals

public boolean equals(Object ob)
Overrides:
equals in class Object

getCurrency

public Currency getCurrency()

getString

public String getString(Locale loc)

getValue

public double getValue()

getWholeValue

public long getWholeValue()

getFractionValue

public int getFractionValue()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

subtract

public Money subtract(Money amt)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011 enStratus Networks LLC. All Rights Reserved.