com.github.TKnudsen.ComplexDataObject.data.features.numericalData.NumericalFeature Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of complex-data-object Show documentation
Show all versions of complex-data-object Show documentation
A library that models real-world objects in Java, referred to as ComplexDataObjects. Other features: IO and preprocessing of ComplexDataObjects.
package com.github.TKnudsen.ComplexDataObject.data.features.numericalData;
import com.github.TKnudsen.ComplexDataObject.data.features.Feature;
import com.github.TKnudsen.ComplexDataObject.data.features.FeatureType;
/**
*
* Title: NumericalFeature
*
*
*
* Description:
*
*
*
* Copyright: Copyright (c) 2016
*
*
* @author Juergen Bernard
* @version 1.0
*/
public class NumericalFeature extends Feature {
/**
*
*/
private static final long serialVersionUID = 7244765037515290604L;
public NumericalFeature(String featureName, Double featureValue) {
super(featureName, featureValue, FeatureType.DOUBLE);
}
@Override
public String toString() {
// return "NumericalFeature " + featureName + ": " + featureValue + " ("
// + featureType.name() + ") ";
return featureValue + " (" + featureType.name() + ") ";
}
public double doubleValue() {
return featureValue.doubleValue();
}
@Override
public NumericalFeature clone() {
return new NumericalFeature(featureName, featureValue);
}
}