net.sf.mpxj
Class Rate

java.lang.Object
  extended by net.sf.mpxj.Rate

public final class Rate
extends Object

This class represents a currency rate per period of time (for example $10/h) as found in an MPX file.


Constructor Summary
Rate(double amount, TimeUnit time)
          This constructor builds an instance of this class from a currency amount and a time unit.
Rate(Number amount, TimeUnit time)
          This constructor builds an instance of this class from a currency amount and a time unit.
 
Method Summary
 boolean equals(Object obj)
          
 double getAmount()
          Accessor method to retrieve the currency amount.
 TimeUnit getUnits()
          Accessor method to retrieve the time units.
 int hashCode()
          
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Rate

public Rate(Number amount,
            TimeUnit time)
This constructor builds an instance of this class from a currency amount and a time unit.

Parameters:
amount - currency amount
time - time units

Rate

public Rate(double amount,
            TimeUnit time)
This constructor builds an instance of this class from a currency amount and a time unit.

Parameters:
amount - currency amount
time - time units
Method Detail

getAmount

public double getAmount()
Accessor method to retrieve the currency amount.

Returns:
amount component of the rate

getUnits

public TimeUnit getUnits()
Accessor method to retrieve the time units.

Returns:
time component of the rate

equals

public boolean equals(Object obj)

Overrides:
equals in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2012. All Rights Reserved.