Package org.refcodes.criteria
Class AbstractCriteriaNode
- 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 baseCriteriaNode
functionality provided forCriteriaNode
implementations.- Version:
- $Id: $Id
- Author:
- steiner
-
-
Constructor Summary
Constructors Constructor Description AbstractCriteriaNode(java.lang.String aName)
Constructs aCriteriaNode
with the given name.AbstractCriteriaNode(java.lang.String aName, Criteria... aChildren)
Constructs aCriteriaNode
with the given name and the providedCriteria
children.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addChild(Criteria aChild)
Adds a childCriteria
to theCriteriaNode
.java.util.List<Criteria>
getChildren()
Returns the list of childCriteria
instances contained in theCriteriaNode
.-
Methods inherited from class org.refcodes.criteria.AbstractCriteria
getName
-
-
-
-
Constructor Detail
-
AbstractCriteriaNode
public AbstractCriteriaNode(java.lang.String aName)
Constructs aCriteriaNode
with the given name.- Parameters:
aName
- The name of theCriteriaNode
.
-
AbstractCriteriaNode
public AbstractCriteriaNode(java.lang.String aName, Criteria... aChildren)
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 Detail
-
addChild
public void addChild(Criteria aChild) throws java.lang.IllegalStateException, java.lang.IllegalArgumentException
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:
java.lang.IllegalStateException
- In case constraints in terms of state are violated, implementation depended.java.lang.IllegalArgumentException
- In case constraints in terms of argument are violated, implementation depended.
-
getChildren
public java.util.List<Criteria> getChildren()
Returns the list of childCriteria
instances contained in theCriteriaNode
.- Specified by:
getChildren
in interfaceCriteriaNode
- Returns:
- The
Criteria
instances contained in theCriteriaNode
.
-
-