biz.hammurapi.rules.tutorial.rules
Class SiblingRules

java.lang.Object
  extended by biz.hammurapi.config.ComponentBase
      extended by biz.hammurapi.rules.AbstractRule
          extended by biz.hammurapi.rules.Rule
              extended by biz.hammurapi.rules.tutorial.rules.SiblingRules
All Implemented Interfaces:
biz.hammurapi.config.Component, biz.hammurapi.config.Context, biz.hammurapi.dispatch.InvocationTarget, biz.hammurapi.metrics.MeasurementCollector, biz.hammurapi.metrics.MeasurementConsumer, biz.hammurapi.rules.Constants

public class SiblingRules
extends biz.hammurapi.rules.Rule


Nested Class Summary
 
Nested classes/interfaces inherited from class biz.hammurapi.rules.Rule
biz.hammurapi.rules.Rule.AcceptInfo, biz.hammurapi.rules.Rule.ChangeDetector
 
Field Summary
 
Fields inherited from class biz.hammurapi.config.ComponentBase
owner
 
Fields inherited from interface biz.hammurapi.rules.Constants
COLLECTION_MANAGER, DESCRIPTION, HANDLE_MANAGER, KNOWLEDGE_COMPACTOR, NAME, NEGATOR_CLASS, OBJECT_FILTER, RETAIN_NEGATORS, RULES, URI_DIRECT, URI_PROPERTY, WORKER_REF
 
Constructor Summary
SiblingRules()
           
 
Method Summary
 void infer(Child child, Child anotherChild)
          If two children have common parent then they are siblings.
 Sibling infer(Sibling sibling)
          Male sibling is brother, female sibling is sister.
 
Methods inherited from class biz.hammurapi.rules.Rule
getInvocationCounter, getInvocationHandlers, getRemoveHandlers, newChangeDetector, post, remove, reset, resetInvocationCounter, setMethodFactTypes, setMethodFactTypes, setMethodFactTypes, setMethodFactTypes, start, update
 
Methods inherited from class biz.hammurapi.rules.AbstractRule
getCollection, getDescription, getName, setDescription, setName, stop, toString
 
Methods inherited from class biz.hammurapi.config.ComponentBase
addMeasurement, get, getChild, getMeasurementConsumer, getOwner, getOwner, setMeasurementConsumer, setOwner
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SiblingRules

public SiblingRules()
Method Detail

infer

public Sibling infer(Sibling sibling)
Male sibling is brother, female sibling is sister. If A is a sibling of B then B is a sibling of A.

Parameters:
sibling -
Returns:
Brother or Sister.

infer

public void infer(Child child,
                  Child anotherChild)
If two children have common parent then they are siblings.

Parameters:
child -
anotherChild -


Copyright © 2006 Hammurapi Group. All Rights Reserved.