|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbiz.hammurapi.config.ComponentBase
biz.hammurapi.rules.AbstractRule
biz.hammurapi.rules.Rule
biz.hammurapi.rules.tutorial.rules.Validator
public class Validator
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 | |
---|---|
Validator()
|
Method Summary | |
---|---|
void |
setLegalAge(int legalAge)
Minimal age when people are allowed to marry. |
void |
validate(CloseRelative r1,
CloseRelative r2)
Close relatives can have only relationship of one type with each other. |
void |
validate(Parent parent)
Validates that difference between parent and child age is not less than legal age. |
void |
validate(Relative relative)
A person cannot be a relative of self. |
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 |
---|
public Validator()
Method Detail |
---|
public void validate(Relative relative)
relative
- public void validate(CloseRelative r1, CloseRelative r2)
r1
- r2
- public void setLegalAge(int legalAge)
legalAge
- Legal age in yearspublic void validate(Parent parent)
mother
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |