|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Attribute
Attributes should hold all information about a single attribute.
| Field Summary | |
|---|---|
static java.lang.String |
MISSING_NOMINAL_VALUE
Indicates a missing value for nominal values. |
static int |
UNDEFINED_ATTRIBUTE_INDEX
Used to identify that this attribute is not part of any example table. |
static int |
VIEW_ATTRIBUTE_INDEX
Used to identify view attributes |
| Method Summary | |
|---|---|
void |
addOwner(Attributes attributes)
Sets the Attributes instance to which this attribute belongs. |
void |
addTransformation(AttributeTransformation transformation)
|
void |
clearTransformations()
Clear all transformations. |
java.lang.Object |
clone()
Clones this attribute. |
boolean |
equals(java.lang.Object o)
Returns true if the given object is an attribute with the same name and table index. |
java.util.Iterator<Statistics> |
getAllStatistics()
Returns an iterator over all statistics objects available for this type of attribute. |
java.lang.String |
getAsString(double value,
int digits,
boolean quoteNominal)
Returns a formatted string of the given value according to the attribute type. |
int |
getBlockType()
Returns the block type of this attribute. |
java.lang.String |
getConstruction()
Returns the construction description. |
double |
getDefault()
Returns the default value for this attribute. |
AttributeTransformation |
getLastTransformation()
|
NominalMapping |
getMapping()
Returns the nominal mapping between nominal values and internal double representations. |
java.lang.String |
getName()
Returns the name of the attribute. |
double |
getStatistics(java.lang.String statisticsName)
Deprecated. Please use the method ExampleSet.getStatistics(Attribute, String) instead. |
double |
getStatistics(java.lang.String statisticsName,
java.lang.String parameter)
Deprecated. Please use the method ExampleSet.getStatistics(Attribute, String, String) instead. |
int |
getTableIndex()
Returns the index in the example table. |
double |
getValue(DataRow row)
Returns the value for the column this attribute corresponds to in the given data row. |
int |
getValueType()
Returns the value type of this attribute. |
int |
hashCode()
Returns the hash code. |
boolean |
isNominal()
Returns true if the attribute is nominal. |
boolean |
isNumerical()
Returns true if the attribute is nominal. |
void |
registerStatistics(Statistics statistics)
Registers the attribute statistics. |
void |
removeOwner(Attributes attributes)
|
void |
setBlockType(int b)
Sets the block type of this attribute. |
void |
setConstruction(java.lang.String description)
Sets the construction description. |
void |
setDefault(double value)
Sets the default value for this attribute. |
void |
setMapping(NominalMapping nominalMapping)
Returns the nominal mapping between nominal values and internal double representations. |
void |
setName(java.lang.String name)
Sets the name of the attribute. |
void |
setTableIndex(int index)
Sets the index in the example table. |
void |
setValue(DataRow row,
double value)
Sets the value for the column this attribute corresponds to in the given data row. |
java.lang.String |
toString()
Returns a human readable string that describes this attribute. |
| Field Detail |
|---|
static final int UNDEFINED_ATTRIBUTE_INDEX
static final int VIEW_ATTRIBUTE_INDEX
static final java.lang.String MISSING_NOMINAL_VALUE
Double.isNaN(double).
| Method Detail |
|---|
boolean equals(java.lang.Object o)
equals in class java.lang.Objectint hashCode()
hashCode in class java.lang.Objectjava.lang.Object clone()
java.lang.String getName()
void setName(java.lang.String name)
int getTableIndex()
void setTableIndex(int index)
void addOwner(Attributes attributes)
Attributes to which this
AttributeRole is added.
void removeOwner(Attributes attributes)
double getValue(DataRow row)
void setValue(DataRow row,
double value)
void addTransformation(AttributeTransformation transformation)
AttributeTransformation getLastTransformation()
void clearTransformations()
java.util.Iterator<Statistics> getAllStatistics()
registerStatistics(Statistics).
void registerStatistics(Statistics statistics)
@Deprecated double getStatistics(java.lang.String statisticsName)
ExampleSet.getStatistics(Attribute, String) instead.
@Deprecated
double getStatistics(java.lang.String statisticsName,
java.lang.String parameter)
ExampleSet.getStatistics(Attribute, String, String) instead.
java.lang.String getConstruction()
void setConstruction(java.lang.String description)
NominalMapping getMapping()
void setMapping(NominalMapping nominalMapping)
int getBlockType()
Ontology.ATTRIBUTE_BLOCK_TYPEvoid setBlockType(int b)
Ontology.ATTRIBUTE_BLOCK_TYPEint getValueType()
Ontology.ATTRIBUTE_VALUE_TYPEjava.lang.String toString()
toString in class java.lang.Objectvoid setDefault(double value)
double getDefault()
boolean isNominal()
boolean isNumerical()
java.lang.String getAsString(double value,
int digits,
boolean quoteNominal)
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||