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 ZeroCostModel

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

All Implemented Interfaces:
  Serializable, ResourceCostModel

    public class ZeroCostModel

extends Object
implements ResourceCostModel

The ZeroCostModel provides a default implementation of a `ResourceCostModel`.

See Also:
  Serialized Form

Nested Class Summary

Nested classes/interfaces inherited from interface org.jini.rio.core.ResourceCostModel
`ResourceCostModel.TimeBoundary`

Constructor Summary
`ZeroCostModel()`

Method Summary
`void` | `addTimeBoundary(ResourceCostModel.TimeBoundary ignored)` Implemented to meet ResourceCostModel contract
`double` | `getCostPerUnit(long duration)` Get the cost per unit
`String` | `getDescription()` Get the description of the ResourceCostModel

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

Constructor Detail

### ZeroCostModel

    public ZeroCostModel()

Method Detail

### addTimeBoundary

    public void addTimeBoundary(ResourceCostModel.TimeBoundary ignored)

  Implemented to meet ResourceCostModel contract

  Specified by:
    `addTimeBoundary` in interface `ResourceCostModel`
  Parameters:
    `ignored` - A TimeBoundary indicating the attributes to be applied to the computation of cost per unit for resource use over a duration
  See Also:
    `ResourceCostModel.addTimeBoundary(org.jini.rio.core.ResourceCostModel.TimeBoundary)`

### getCostPerUnit

    public double getCostPerUnit(long duration)

  Description copied from interface: `ResourceCostModel`
  Get the cost per unit

  Specified by:
    `getCostPerUnit` in interface `ResourceCostModel`
  Parameters:
    `duration` - The amount of time in milliseconds that is to be used to compute the cost per unit
  Returns:
    The cost per unit
  See Also:
    `ResourceCostModel.getCostPerUnit(long)`

### getDescription

    public String getDescription()

  Description copied from interface: `ResourceCostModel`
  Get the description of the ResourceCostModel

  Specified by:
    `getDescription` in interface `ResourceCostModel`
  Returns:
    String The description of the ResourceCostModel
  See Also:
    `ResourceCostModel.getDescription()`

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.