Class OutputEnableRulesSpecify
Object
org.anchoranalysis.bean.AnchorBean<OutputEnabledRules>
org.anchoranalysis.io.output.bean.rules.OutputEnabledRules
org.anchoranalysis.io.output.bean.rules.OutputEnableRulesSpecify
- Direct Known Subclasses:
AddToDefaults,IgnoreUnderscorePrefixUnless,NoneExcept,PermissiveExcept
public abstract class OutputEnableRulesSpecify extends OutputEnabledRules
Base class for an
OutputEnabledRules that specifies particular output-names for first and
second levels.- Author:
- Owen Feehan
-
Constructor Summary
Constructors Modifier Constructor Description protectedOutputEnableRulesSpecify()protectedOutputEnableRulesSpecify(org.anchoranalysis.bean.primitive.StringSet first)Create with a specific set of first-level output names. -
Method Summary
Modifier and Type Method Description protected abstract SingleLevelOutputEnabledcreateSecondLevelFromSet(org.anchoranalysis.bean.primitive.StringSet outputNames)Creates a new second-levelSingleLevelOutputEnabledfrom the relevant set of strings.protected booleanfirstLevelContains(String outputName)Whether the first-level names contain a particular output (if defined)?org.anchoranalysis.bean.primitive.StringSetgetFirst()Output-names in the first-level.List<org.anchoranalysis.bean.NamedBean<org.anchoranalysis.bean.primitive.StringSet>>getSecond()Output-names in the second-level (for all first level output-names).protected booleanisFirstDefined()Are output-names in the first-level defined?protected SingleLevelOutputEnabledsecondLevelOutputs(String outputName, OutputEnabled defaultValue)Retrieves a second-levelSingleLevelOutputEnabledcorresponding to a first-level output-name.voidsetFirst(org.anchoranalysis.bean.primitive.StringSet first)Output-names in the first-level.voidsetSecond(List<org.anchoranalysis.bean.NamedBean<org.anchoranalysis.bean.primitive.StringSet>> second)Output-names in the second-level (for all first level output-names).
-
Constructor Details
-
OutputEnableRulesSpecify
protected OutputEnableRulesSpecify(org.anchoranalysis.bean.primitive.StringSet first)Create with a specific set of first-level output names.- Parameters:
first- first-level output-names
-
OutputEnableRulesSpecify
protected OutputEnableRulesSpecify()
-
-
Method Details
-
firstLevelContains
Whether the first-level names contain a particular output (if defined)?- Parameters:
outputName- the output-name to query.- Returns:
- true iff the first-level names are defined and
outputNameis contained.
-
createSecondLevelFromSet
protected abstract SingleLevelOutputEnabled createSecondLevelFromSet(org.anchoranalysis.bean.primitive.StringSet outputNames)Creates a new second-levelSingleLevelOutputEnabledfrom the relevant set of strings.- Parameters:
outputNames- a set of output-names that are used to create theSingleLevelOutputEnabled.- Returns:
- the newly created
SingleLevelOutputEnabled.
-
secondLevelOutputs
protected SingleLevelOutputEnabled secondLevelOutputs(String outputName, OutputEnabled defaultValue)Retrieves a second-levelSingleLevelOutputEnabledcorresponding to a first-level output-name.- Parameters:
outputName- the name of the first-level output.defaultValue- the default-value used if no existing second-level entry exists.- Returns:
- an existing corresponding
SingleLevelOutputEnabledor otherwise a newly created one.
-
isFirstDefined
protected boolean isFirstDefined()Are output-names in the first-level defined?- Returns:
- true iff they are defined.
-
getFirst
public org.anchoranalysis.bean.primitive.StringSet getFirst()Output-names in the first-level. -
setFirst
public void setFirst(org.anchoranalysis.bean.primitive.StringSet first)Output-names in the first-level. -
getSecond
public List<org.anchoranalysis.bean.NamedBean<org.anchoranalysis.bean.primitive.StringSet>> getSecond()Output-names in the second-level (for all first level output-names).If the list is empty, all second-level outputs are considered permissive.
-
setSecond
public void setSecond(List<org.anchoranalysis.bean.NamedBean<org.anchoranalysis.bean.primitive.StringSet>> second)Output-names in the second-level (for all first level output-names).If the list is empty, all second-level outputs are considered permissive.
-