/*
@license.text@
 */
package com.hammurapi.reasoning.tutorial.rules;

import com.hammurapi.reasoning.spi.Infer;
import com.hammurapi.reasoning.spi.InferenceContext;
import com.hammurapi.reasoning.tutorial.objectmodel.Child;
import com.hammurapi.reasoning.tutorial.objectmodel.Son;

public class SonRule {
	
	@Infer(Son.class)
	public void infer(Child child) {
		if (!(child instanceof Son) && child.getSubject().isMale()) {
			InferenceContext.INSTANCE.post(new Son(child.getSubject(), child.getObject()));
		}
	}
}
