org.drools.semantics.base
Class BaseDurationFactory

java.lang.Object
  extended by org.drools.semantics.base.BaseDurationFactory
All Implemented Interfaces:
DurationFactory

public class BaseDurationFactory
extends java.lang.Object
implements DurationFactory

An implementation of the DurationFactory interface.


Constructor Summary
BaseDurationFactory()
           
 
Method Summary
 Duration newDuration(Rule rule, RuleBaseContext context, Configuration config)
          Returns a new Duration object configured using the given Configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseDurationFactory

public BaseDurationFactory()
Method Detail

newDuration

public Duration newDuration(Rule rule,
                            RuleBaseContext context,
                            Configuration config)
Returns a new Duration object configured using the given Configuration.

Specified by:
newDuration in interface DurationFactory
Parameters:
config - a Configuration object containing "days", "hours", "minutes", and/or "seconds" attributes. All attributes are optional and the given Configuration object may be null.
Returns:
a new Duration object.