com.prozima.pengine
Class HourlyCostRule

java.lang.Object
  extended by com.prozima.pengine.CostRule
      extended by com.prozima.pengine.HourlyCostRule
All Implemented Interfaces:
java.lang.Cloneable

public class HourlyCostRule
extends CostRule

Cost rule defines the cost of using a resource using an hourly rate.


Constructor Summary
HourlyCostRule(java.util.Currency inCurrency, java.math.BigDecimal inRate)
          Create an instance of the cost rule, defining the rate per hour and the currency.
 
Method Summary
 boolean setDaysOfWeek(java.util.Set<TimeConstants.DayOfWeek> inDays)
          Set the days of the week during which this cost rule applies.
 boolean setWorkTriggerPerDay(long inTriggerInMins)
          Set a trigger on the amount of work which must be completed during the same day before applying this rate.
 
Methods inherited from class com.prozima.pengine.CostRule
setCurrency, setRate, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HourlyCostRule

public HourlyCostRule(java.util.Currency inCurrency,
                      java.math.BigDecimal inRate)
Create an instance of the cost rule, defining the rate per hour and the currency.

Parameters:
inCurrency - Currency used to calculate the cost. null is not permitted.
inRate - Rate per hour. null is not permitted.
Method Detail

setDaysOfWeek

public boolean setDaysOfWeek(java.util.Set<TimeConstants.DayOfWeek> inDays)
Set the days of the week during which this cost rule applies.

Parameters:
inDays - Days of the week during which the rule applies.
Returns:
true if new value was set correctly, otherwise false.

setWorkTriggerPerDay

public boolean setWorkTriggerPerDay(long inTriggerInMins)
Set a trigger on the amount of work which must be completed during the same day before applying this rate. Defaults to 0 if not explicitly called.

Parameters:
inTriggerInMins - Minimum work in minutes which must be worked per day before this rate applies. Parameter must be >= 0.
Returns:
true if value was set correctly, otherwise false.