Class AbstractCatalogVisitor<RESULT,CONTEXT>
- java.lang.Object
-
- gov.nist.secauto.oscal.lib.model.control.catalog.AbstractCatalogVisitor<RESULT,CONTEXT>
-
- All Implemented Interfaces:
ICatalogVisitor<RESULT,CONTEXT>
public abstract class AbstractCatalogVisitor<RESULT,CONTEXT> extends Object implements ICatalogVisitor<RESULT,CONTEXT>
-
-
Constructor Summary
Constructors Constructor Description AbstractCatalogVisitor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected RESULT
aggregateResult(RESULT previous, RESULT current)
Aggregate two results into one.protected abstract RESULT
defaultResult()
Get a new initial/default result for the visitor.RESULT
visitCatalog(Catalog catalog, CONTEXT context)
Visit the providedcatalog
.RESULT
visitControl(Control control, CONTEXT context)
Visit the providedcontrol
.RESULT
visitGroup(CatalogGroup group, CONTEXT context)
Visit the providedgroup
.RESULT
visitParameter(Parameter parameter, CONTEXT context)
Visit the providedparameter
.
-
-
-
Constructor Detail
-
AbstractCatalogVisitor
public AbstractCatalogVisitor()
-
-
Method Detail
-
defaultResult
protected abstract RESULT defaultResult()
Get a new initial/default result for the visitor.- Returns:
- the result
-
aggregateResult
protected RESULT aggregateResult(RESULT previous, RESULT current)
Aggregate two results into one.- Parameters:
previous
- the first resultcurrent
- the next result- Returns:
- the result produced by combining the two results
-
visitCatalog
public RESULT visitCatalog(Catalog catalog, CONTEXT context)
Description copied from interface:ICatalogVisitor
Visit the providedcatalog
.- Specified by:
visitCatalog
in interfaceICatalogVisitor<RESULT,CONTEXT>
- Parameters:
catalog
- the bound catalog objectcontext
- the visitor context- Returns:
- a meaningful result from visiting the object
-
visitGroup
public RESULT visitGroup(@NonNull CatalogGroup group, CONTEXT context)
Description copied from interface:ICatalogVisitor
Visit the providedgroup
.- Specified by:
visitGroup
in interfaceICatalogVisitor<RESULT,CONTEXT>
- Parameters:
group
- the bound group objectcontext
- the visitor context- Returns:
- a meaningful result from visiting the object
-
visitControl
public RESULT visitControl(Control control, CONTEXT context)
Description copied from interface:ICatalogVisitor
Visit the providedcontrol
.- Specified by:
visitControl
in interfaceICatalogVisitor<RESULT,CONTEXT>
- Parameters:
control
- the bound control objectcontext
- the visitor context- Returns:
- a meaningful result from visiting the object
-
visitParameter
public RESULT visitParameter(Parameter parameter, CONTEXT context)
Description copied from interface:ICatalogVisitor
Visit the providedparameter
.- Specified by:
visitParameter
in interfaceICatalogVisitor<RESULT,CONTEXT>
- Parameters:
parameter
- the bound parameter objectcontext
- the visitor context- Returns:
- a meaningful result from visiting the object
-
-