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 RESULTaggregateResult(RESULT previous, RESULT current)Aggregate two results into one.protected abstract RESULTdefaultResult()Get a new initial/default result for the visitor.RESULTvisitCatalog(Catalog catalog, CONTEXT context)Visit the providedcatalog.RESULTvisitControl(Control control, CONTEXT context)Visit the providedcontrol.RESULTvisitGroup(CatalogGroup group, CONTEXT context)Visit the providedgroup.RESULTvisitParameter(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:ICatalogVisitorVisit the providedcatalog.- Specified by:
visitCatalogin 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:ICatalogVisitorVisit the providedgroup.- Specified by:
visitGroupin 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:ICatalogVisitorVisit the providedcontrol.- Specified by:
visitControlin 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:ICatalogVisitorVisit the providedparameter.- Specified by:
visitParameterin interfaceICatalogVisitor<RESULT,CONTEXT>- Parameters:
parameter- the bound parameter objectcontext- the visitor context- Returns:
- a meaningful result from visiting the object
-
-