org.kuali.rice.krms.api.engine
Class Facts

java.lang.Object
  extended by org.kuali.rice.krms.api.engine.Facts
All Implemented Interfaces:
Serializable, ModelObjectBasic, ModelObjectComplete

public final class Facts
extends Object
implements ModelObjectComplete, Serializable

Parameter object for the Engine used to pass in mappings from Term to value (aka facts). In rule parlance, a fact is a concrete value of a term. Intuitively this relationship is one of definition and instance, similar to a parameter definition (e.g. int count) for a function (or method) in a programming language and a parameter value (e.g. 5).

Facts is immutable, and has a private constructor. Use the inner Facts.Builder class to construct.

Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
Serialized Form

Nested Class Summary
static class Facts.Builder
          Builder for a Facts parameter object
 
Field Summary
static Facts EMPTY_FACTS
          empty facts object
 
Method Summary
 boolean equals(Object o)
          All "Complete" model object's should adhere to the ModelObjectComplete.equals(Object) contract.
 Map<Term,Object> getFactMap()
           
 int hashCode()
          All "Complete" model object's should adhere to the ModelObjectComplete.hashCode() contract.
 String toString()
          This will return a proper string representation of the Model Object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

EMPTY_FACTS

public static final Facts EMPTY_FACTS
empty facts object

Method Detail

getFactMap

public Map<Term,Object> getFactMap()
Returns:
the Map of Terms to fact values. May be empty, will never be null. The returned map is unmodifiable.

equals

public boolean equals(Object o)
Description copied from interface: ModelObjectComplete
All "Complete" model object's should adhere to the ModelObjectComplete.equals(Object) contract.

Specified by:
equals in interface ModelObjectComplete
Overrides:
equals in class Object
Parameters:
o - to object to compare for equality
Returns:
if equal

hashCode

public int hashCode()
Description copied from interface: ModelObjectComplete
All "Complete" model object's should adhere to the ModelObjectComplete.hashCode() contract.

Specified by:
hashCode in interface ModelObjectComplete
Overrides:
hashCode in class Object
Returns:
the hashCode value

toString

public String toString()
Description copied from interface: ModelObjectBasic
This will return a proper string representation of the Model Object. All of the fields comprising the "public" api should be represented in the return value.

Specified by:
toString in interface ModelObjectBasic
Overrides:
toString in class Object
Returns:
the string representation


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.