public List<SelectableFeature> getManualFeatures() { final List<SelectableFeature> featureList = new LinkedList<SelectableFeature>(); for (SelectableFeature selectableFeature : features) { if (selectableFeature.getAutomatic() == Selection.UNDEFINED && !selectableFeature.getFeature().getStructure().hasHiddenParent()) { featureList.add(selectableFeature); } } return featureList; }
/** * Turns all automatic into manual values * * @param discardDeselected if {@code true} all automatic deselected features get undefined * instead of manual deselected */ public void makeManual(boolean discardDeselected) { for (SelectableFeature feature : features) { final Selection autoSelection = feature.getAutomatic(); if (autoSelection != Selection.UNDEFINED) { feature.setAutomatic(Selection.UNDEFINED); if (!discardDeselected || autoSelection == Selection.SELECTED) { feature.setManual(autoSelection); } } } }
/** * This method creates a clone of the given {@link Configuration} * * @param configuration The configuration to clone */ protected Configuration(Configuration configuration) { this.featureModel = configuration.featureModel; this.ignoreAbstractFeatures = configuration.ignoreAbstractFeatures; this.propagator = configuration.propagator.clone(this); propagate = false; this.root = initRoot(); for (SelectableFeature f : configuration.features) { setManual(f.getName(), f.getManual()); setAutomatic(f.getName(), f.getAutomatic()); } this.propagate = configuration.propagate; }