Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Project Rio
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jini.rio.core
Class ResourceCost

    java.lang.Object
      org.jini.rio.core.ResourceCost

All Implemented Interfaces:
  Serializable

    public class ResourceCost

extends Object
implements Serializable

The ResourceCost provides context on the cost of a system resource. Items related to a resource's cost include an actual (monetary) cost value, the number of units, the name of the resource which provided the cost, and a description of the `ResourceCostModel` which calculated the cost

See Also:
  Serialized Form

Constructor Summary
`ResourceCost(String resourceName, double cost, double units, String costModelDescription, Date date)` Create a ResourceCost

Method Summary
`double` | `getCost()`
`String` | `getCostModelDescription()`
`Date` | `getDate()`
`String` | `getResourceName()`
`double` | `getUnits()` Get the number of units used.
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### ResourceCost

    public ResourceCost(String resourceName,
                        double cost,
                        double units,
                        String costModelDescription,
                        Date date)

  Create a ResourceCost

  Parameters:
    `resourceName` - The name of the resource
    `cost` - The computed cost
    `units` - The amount of units being charged
    `costModelDescription` - A description of the `ResourceCostModel` used to compute the cost
    `date` - The date the cost had been computed

Method Detail

### getCost

    public double getCost()

  Returns:
    The computed cost

### getUnits

    public double getUnits()

  Get the number of units used. If the resource is a system resource (a depletion oriented resource), the number of units used corresponds to the utilization of the resource at the time the `ResourceCost` was created.

  Returns:
    The number of units used

### getResourceName

    public String getResourceName()

  Returns:
    The name of the resource which had the cost computed for it

### getDate

    public Date getDate()

  Returns:
    The Date the cost was computed

### getCostModelDescription

    public String getCostModelDescription()

  Returns:
    The description of the `ResourceCostModel` that computed the cost

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Project Rio
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © Project Rio.