com.hammurapi.eventbus.tests.familyties.rules
Class SecondaryRules

Show UML class diagram
java.lang.Object
  extended by com.hammurapi.eventbus.tests.familyties.rules.FamilyTiesRules
      extended by com.hammurapi.eventbus.tests.familyties.rules.SecondaryRules

public class SecondaryRules
extends FamilyTiesRules

Infers aunt, uncle, cousin, niece, nephew


Constructor Summary
SecondaryRules()
           
 
Method Summary
 Cousin infer(Aunt aunt, Parent parent)
          Another way to infer cousin to demonstrate mutiple derivations
 Uncle infer(Brother brother, Parent parent)
          Brother of parent is uncle.
 Cousin infer(Cousin cousin)
          If A is a cousin of B then B is a cousin of A
 Niece infer(Daughter daughter, Sibling sibling)
          Daughter of sibling is niece.
 void infer(FamilyTiesEventDispatchContext dispatchContext, Child child1, Child child2, Sibling sibling)
          Infers cousin as a child or parent's sibling.
 Uncle infer(Husband husband, Aunt aunt)
          Husband of aunt is uncle.
 Aunt infer(Sister sister, Parent parent)
          Sister of parent is aunt.
 Nephew infer(Son son, Sibling sibling)
          Son of sibling is nephew.
 Cousin infer(Uncle uncle, Parent parent)
          Another way to infer cousin to demonstrate mutiple derivations
 Aunt infer(Wife wife, Uncle uncle)
          Wife of uncle is aunt.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecondaryRules

public SecondaryRules()
Method Detail

infer

public void infer(FamilyTiesEventDispatchContext dispatchContext,
                  Child child1,
                  Child child2,
                  Sibling sibling)
Infers cousin as a child or parent's sibling.


infer

public Cousin infer(Cousin cousin)
If A is a cousin of B then B is a cousin of A

Parameters:
cousin -
Returns:

infer

public Cousin infer(Aunt aunt,
                    Parent parent)
Another way to infer cousin to demonstrate mutiple derivations

Parameters:
aunt -
child -

infer

public Cousin infer(Uncle uncle,
                    Parent parent)
Another way to infer cousin to demonstrate mutiple derivations

Parameters:
uncle -
child -

infer

public Aunt infer(Sister sister,
                  Parent parent)
Sister of parent is aunt.

Parameters:
sister -
parent -

infer

public Aunt infer(Wife wife,
                  Uncle uncle)
Wife of uncle is aunt.

Parameters:
sister -
parent -

infer

public Uncle infer(Brother brother,
                   Parent parent)
Brother of parent is uncle.

Parameters:
sister -
parent -

infer

public Uncle infer(Husband husband,
                   Aunt aunt)
Husband of aunt is uncle.

Parameters:
sister -
parent -

infer

public Niece infer(Daughter daughter,
                   Sibling sibling)
Daughter of sibling is niece.


infer

public Nephew infer(Son son,
                    Sibling sibling)
Son of sibling is nephew.