Add a feature into a list.

@param feature A feature name.
761221
public void addFeature(String feature) {
        if (feature == null) {
            throw new IllegalArgumentException("Invalid null argument passed for addFeature");
        }
        feature = feature.trim();
        if (!feature.isEmpty()) { 
            Feature newFeature = new Feature();
            newFeature.addText(feature);
            featureList.add(newFeature);
        }
    }
661093
@Api
	public void panToFeatures(List<Feature> features) {
		PanToFeaturesLazyLoadCallback callback = new PanToFeaturesLazyLoadCallback(features.size());
		for (Feature feature : features) {
			// no need to fetch if we already have the geometry !
			if (feature.isGeometryLoaded()) {
				callback.execute(Arrays.asList(feature));
			} else {
				feature.getLayer().getFeatureStore()
						.getFeature(feature.getId(), GeomajasConstant.FEATURE_INCLUDE_GEOMETRY, callback);			
			}
		}
	}
72885
public void addAttributes(List<Attribute> attributes) {
        for(Attribute attribute : attributes) {
            addAttribute(attribute.getName(), attribute.getValue());
        }
    }
51147
public <T> Governator setFeature(GovernatorFeature<T> feature, T value) {
        this.featureOverrides.put(feature, value);
        return this;
    }
141513
protected void invokeFeature(String featureSwitch, Feature feature ) {
        if(Config.getBooleanProperty(featureSwitch,true)) {
            feature.execute();
        }
    }
321859
public void addFeature(int bioStart, int bioEnd, FeatureInterface<AbstractSequence<C>, C> feature) {
		SequenceLocation<AbstractSequence<C>, C> sequenceLocation =
				new SequenceLocation<AbstractSequence<C>, C>(bioStart, bioEnd, this);
		feature.setLocation(sequenceLocation);
		addFeature(feature);
	}
683320
def add_custom_feature(self, feature):
        
        if feature.dimension <= 0:
            raise ValueError("Dimension has to be positive. "
                             "Please override dimension attribute in feature!")

        if not hasattr(feature, 'transform'):
            raise ValueError("no 'transform' method in given feature")
        elif not callable(getattr(feature, 'transform')):
            raise ValueError("'transform' attribute exists but is not a method")

        self.__add_feature(feature)
205340
public int ensureFeature(String featureName) {
        int feature = featureToIndex.getOrDefault(featureName, -1);
        if (feature == -1) {
            synchronized (featureToIndex) {
                feature = featureToIndex.getOrDefault(featureName, -1);
                if (feature == -1) {
                    feature = featureToIndex.size();
                    featureToIndex.put(featureName, feature);
                }
            }
        }
        return feature;
    }
929956
final public void addPositions(Set<Integer> list) {
    int[] positions = ArrayUtils
        .toPrimitive(list.toArray(new Integer[list.size()]));
    addPositions(positions);
  }
897359
static public LinkedHashMap<String,FeatureList> buildFeatureAtrributeIndex(String attribute,FeatureList list){

		LinkedHashMap<String,FeatureList> featureHashMap = new LinkedHashMap<String,FeatureList>();
		FeatureList featureList = list.selectByAttribute(attribute);
		for(FeatureI feature : featureList){
			String value = feature.getAttribute(attribute);
			FeatureList features = featureHashMap.get(value);
			if(features == null){
				features = new FeatureList();
				featureHashMap.put(value, features);
			}
			features.add(feature);
		}

		return featureHashMap;
	}
841332
public void addConfiguredFileset(FileSet fs) {
        File dir = fs.getDir();
        DirectoryScanner ds = fs.getDirectoryScanner();
        String[] fileNames = ds.getIncludedFiles();
        for (String fileName : fileNames) {
            featureFiles.add(new File(dir, fileName));
        }
    }
21559
function(feature) {
        var fid = feature ? feature.fid || feature.id : null;
        var hfid = this.hoverFeature ?
            this.hoverFeature.fid || this.hoverFeature.id : null;
            
        if(hfid && hfid != fid) {
            this.events.triggerEvent("outfeature",
                {feature: this.hoverFeature});
            this.hoverFeature = null;
        }
        if(fid && fid != hfid) {
            this.events.triggerEvent("hoverfeature", {feature: feature});
            this.hoverFeature = feature;
        }
    }
1304817
public void addHasFeature(HasFeature hasFeature) {
		widget.addHasFeature(hasFeature);

		if (hasFeature instanceof Widget) {
			panel.insert((Widget) hasFeature, panel.getWidgetCount() - 1);
		}
	}
1269518
final public void addList(ArrayList<MtasTreeHit<T>> list) {
    if (list != null) {
      lists.add(list);
    }
  }
582333
def include_feature(self, name):
        """'"""

        if self.feature_is_included(name) == 0:
            descr = self.features[name].description
            raise DistutilsOptionError(
                descr + " is required, but was excluded or is not available"
            )
        self.features[name].include_in(self)
        self._set_feature(name, 1)
1141704
public void put(String name, List<String> list) {
        remove(name);
        for (String v : list)
            if (v != null)
                add(name, v);
    }
504256
public void addTrainingInstance(String label, List<String> features) {
    maxent.addInstance(label,features);
  }