public class Feature extends Object implements Comparable<Feature>
Modifier and Type | Field and Description |
---|---|
protected String |
name |
protected Object |
value |
Constructor and Description |
---|
Feature(String name,
Object value,
boolean isDefaultValue,
FeatureType type)
Creates a feature that is aware if the value is a default value.
|
Feature(String name,
Object value,
FeatureType type) |
Modifier and Type | Method and Description |
---|---|
Set<Feature> |
asSet() |
int |
compareTo(Feature o) |
boolean |
equals(Object obj) |
String |
getName() |
FeatureType |
getType() |
Object |
getValue() |
int |
hashCode() |
boolean |
isDefaultValue() |
void |
setDefault(boolean isDefault)
Marks the feature value as being either the default value for this feature or not.
|
void |
setName(String name) |
void |
setValue(Object value) |
String |
toString() |
public Feature(String name, Object value, FeatureType type) throws org.dkpro.tc.api.exception.TextClassificationException
public Feature(String name, Object value, boolean isDefaultValue, FeatureType type) throws org.dkpro.tc.api.exception.TextClassificationException
name
- Name of the featurevalue
- The feature valueisDefaultValue
- A boolean if the feature value is a default value i.e. means this feature is
not set for an instancetype
- Type of this featureorg.dkpro.tc.api.exception.TextClassificationException
- in case of an errorpublic Object getValue()
public void setValue(Object value)
public String getName()
public void setName(String name)
public boolean isDefaultValue()
public void setDefault(boolean isDefault)
isDefault
- boolean that expresses whether the feature value is the default value for a featurepublic int compareTo(Feature o)
compareTo
in interface Comparable<Feature>
public FeatureType getType()
Copyright © 2013–2019 Ubiquitous Knowledge Processing (UKP) Lab. All rights reserved.