com.github.TKnudsen.ComplexDataObject.data.features.FeatureSchemaEntry 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;
/**
*
* Title: FeatureSchemaEntry
*
*
*
* Description: Describes individual features within a FeatureSchema.
*
*
*
* Copyright: Copyright (c) 2016
*
*
* @author Juergen Bernard
* @version 1.01
*/
public class FeatureSchemaEntry {
protected final String name;
protected final Class type;
private final FeatureType featureType;
protected final FeatureSchema typeSchema;
private Double weight = 1.0;
public FeatureSchemaEntry(String name, Class type, FeatureType featureType) {
this(name, type, featureType, null);
}
public FeatureSchemaEntry(String name, Class type, FeatureType featureType, FeatureSchema typeSchema) {
this.name = name;
this.type = type;
this.featureType = featureType;
this.typeSchema = typeSchema;
}
public String getName() {
return name;
}
public Class getType() {
return type;
}
public FeatureType getFeatureType() {
return featureType;
}
public FeatureSchema getTypeSchema() {
return typeSchema;
}
@Override
public String toString() {
String output = "";
output += ("Name: " + name + "\t" + "Type: " + type.getSimpleName() + "\t" + "FeatureType: " + featureType);
return output;
}
public Double getWeight() {
return weight;
}
public void setWeight(Double weight) {
this.weight = weight;
}
}