java.lang.Object
org.refcodes.criteria.AbstractCriteria
org.refcodes.criteria.AbstractCriteriaNode
- All Implemented Interfaces:
Criteria
,CriteriaNode
,org.refcodes.mixin.NameAccessor
public abstract class AbstractCriteriaNode extends AbstractCriteria implements CriteriaNode
Base class with the base
CriteriaNode
functionality provided for CriteriaNode
implementations.- Version:
- $Id: $Id
- Author:
- steiner
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.refcodes.mixin.NameAccessor
org.refcodes.mixin.NameAccessor.NameBuilder<B extends org.refcodes.mixin.NameAccessor.NameBuilder<B>>, org.refcodes.mixin.NameAccessor.NameMutator, org.refcodes.mixin.NameAccessor.NameProperty
-
Constructor Summary
Constructors Constructor Description AbstractCriteriaNode(String aName)
Constructs aCriteriaNode
with the given name.AbstractCriteriaNode(String aName, Criteria... aChildren)
Constructs aCriteriaNode
with the given name and the providedCriteria
children. -
Method Summary
Modifier and Type Method Description void
addChild(Criteria aChild)
Adds a childCriteria
to theCriteriaNode
.List<Criteria>
getChildren()
Returns the list of childCriteria
instances contained in theCriteriaNode
.Methods inherited from class org.refcodes.criteria.AbstractCriteria
getName
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.refcodes.mixin.NameAccessor
getName
-
Constructor Details
-
AbstractCriteriaNode
Constructs aCriteriaNode
with the given name.- Parameters:
aName
- The name of theCriteriaNode
.
-
AbstractCriteriaNode
Constructs aCriteriaNode
with the given name and the providedCriteria
children.- Parameters:
aName
- The name of theCriteriaNode
.aChildren
- TheCriteria
children to be contained in theCriteriaNode
.
-
-
Method Details
-
addChild
Adds a childCriteria
to theCriteriaNode
. In case a specializedCriteriaNode
applies constraints on the number or type ofCriteria
which may be added, an according exception may be thrown. For example theSingleCriteriaNode
applies constraints on this method.- Specified by:
addChild
in interfaceCriteriaNode
- Parameters:
aChild
- The childCriteria
to be added.- Throws:
IllegalStateException
- In case constraints in terms of state are violated, implementation depended.IllegalArgumentException
- In case constraints in terms of argument are violated, implementation depended.
-
getChildren
Returns the list of childCriteria
instances contained in theCriteriaNode
.- Specified by:
getChildren
in interfaceCriteriaNode
- Returns:
- The
Criteria
instances contained in theCriteriaNode
.
-