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 ResourceCostModel.TimeBoundary

    java.lang.Object
      org.jini.rio.core.ResourceCostModel.TimeBoundary

All Implemented Interfaces:
  Serializable, Comparable

Enclosing interface:
  ResourceCostModel

    public static class ResourceCostModel.TimeBoundary

extends Object
implements Comparable, Serializable

Indicates a time boundary and the multiplier to apply to the cost per unit

See Also:
  Serialized Form

Field Summary
`static int` | `DAYS` Indicates the boundary has been provided in days
`static int` | `HOURS` Indicates the boundary has been provided in hours
`static int` | `MILLIS` Indicates the boundary has been provided in milliseconds
`static int` | `MINUTES` Indicates the boundary has been provided in minutes
`static int` | `SECONDS` Indicates the boundary has been provided in seconds

Constructor Summary
`ResourceCostModel.TimeBoundary(long boundary, double multiplier)` Create a TimeBoundary.
`ResourceCostModel.TimeBoundary(long boundary, double multiplier, int type)` Create a TimeBoundary.

Method Summary
`int` | `compareTo(Object o)` Compares this TimeBoundary object with another TimeBoundary object for order using the boundary attribute
`boolean` | `equals(Object o)` A TimeBoundary is equal to another TimeBoundary if their boundary attributes are equal
`long` | `getBoundary()`
`double` | `getMultiplier()`
`int` | `getType()`
`int` | `hashCode()` The hashCode is the int conversion of the boundary attribute

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

Field Detail

### MILLIS

    public static final int MILLIS

  Indicates the boundary has been provided in milliseconds

  See Also:
    Constant Field Values

### SECONDS

    public static final int SECONDS

  Indicates the boundary has been provided in seconds

  See Also:
    Constant Field Values

### MINUTES

    public static final int MINUTES

  Indicates the boundary has been provided in minutes

  See Also:
    Constant Field Values

### HOURS

    public static final int HOURS

  Indicates the boundary has been provided in hours

  See Also:
    Constant Field Values

### DAYS

    public static final int DAYS

  Indicates the boundary has been provided in days

  See Also:
    Constant Field Values

Constructor Detail

### ResourceCostModel.TimeBoundary

    public ResourceCostModel.TimeBoundary(long boundary,
                                          double multiplier)

  Create a TimeBoundary. A TimeBoundary defines a boundary and a multiplier to be used with the cost per unit. The boundary defines a start point for any duration which is greater then or equal to the specified boundary. For example: if the boundary is 300000 (5 minutes) any duration that is 5 minutes or greater will have it's cost per unit muliplied by the multiplier.

  Parameters:
    `boundary` - The amount of time defining a time boundary in milliseconds
    `multiplier` - The value which will be used as a multiplier for the costPerUnit if the duration is greater then or equal to the boundary value

### ResourceCostModel.TimeBoundary

    public ResourceCostModel.TimeBoundary(long boundary,
                                          double multiplier,
                                          int type)

  Create a TimeBoundary. A TimeBoundary defines a boundary and a multiplier to be used with the cost per unit. The boundary defines a start point for any duration which is greater then or equal to the specified boundary. For example: if the boundary is 300000 (5 minutes) any duration that is 5 minutes or greater will have it's cost per unit muliplied by the multiplier.

  Parameters:
    `boundary` - The amount of time defining a time boundary
    `multiplier` - The value which will be used as a multiplier for the costPerUnit if the duration is greater then or equal to the boundary value
    `type` - Determines the type (MILLIS, SECONDS, ...) of the boundary value

Method Detail

### getBoundary

    public long getBoundary()

  Returns:
    The time boundary.

### getMultiplier

    public double getMultiplier()

  Returns:
    The multiplier

### getType

    public int getType()

  Returns:
    The type

### compareTo

    public int compareTo(Object o)

  Compares this TimeBoundary object with another TimeBoundary object for order using the boundary attribute

  Specified by:
    `compareTo` in interface `Comparable`
  Parameters:
    `o` - Object to compare to

### equals

    public boolean equals(Object o)

  A TimeBoundary is equal to another TimeBoundary if their boundary attributes are equal

  Overrides:
    `equals` in class `Object`

### hashCode

    public int hashCode()

  The hashCode is the int conversion of the boundary attribute

  Overrides:
    `hashCode` 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.