public abstract class Attribute
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
Attribute.Type
The type of attributes.
|
| Constructor and Description |
|---|
Attribute(Attribute.Type type,
java.lang.String name)
Constructor.
|
Attribute(Attribute.Type type,
java.lang.String name,
double weight)
Constructor.
|
Attribute(Attribute.Type type,
java.lang.String name,
java.lang.String description)
Constructor.
|
Attribute(Attribute.Type type,
java.lang.String name,
java.lang.String description,
double weight)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
java.lang.String |
getDescription() |
java.lang.String |
getName() |
Attribute.Type |
getType() |
double |
getWeight() |
int |
hashCode() |
Attribute |
setDescription(java.lang.String description) |
Attribute |
setName(java.lang.String name) |
Attribute |
setWeight(double weight) |
java.lang.String |
toString() |
abstract java.lang.String |
toString(double x)
Returns the string representation of a double value of this attribute.
|
abstract double |
valueOf(java.lang.String s)
Returns the double value of a string of this attribute.
|
public Attribute(Attribute.Type type, java.lang.String name)
public Attribute(Attribute.Type type, java.lang.String name, double weight)
public Attribute(Attribute.Type type, java.lang.String name, java.lang.String description)
public Attribute(Attribute.Type type, java.lang.String name, java.lang.String description, double weight)
public Attribute.Type getType()
public java.lang.String getName()
public Attribute setName(java.lang.String name)
public java.lang.String getDescription()
public Attribute setDescription(java.lang.String description)
public double getWeight()
public Attribute setWeight(double weight)
public abstract java.lang.String toString(double x)
x - a double value of this attribute. NaN means missing value.public abstract double valueOf(java.lang.String s)
throws java.text.ParseException
s - a string value of this attribute.java.text.ParseExceptionpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object