public class DateAttribute extends Attribute
Attribute.Type| Constructor and Description |
|---|
DateAttribute(java.lang.String name)
Constructor.
|
DateAttribute(java.lang.String name,
double weight)
Constructor.
|
DateAttribute(java.lang.String name,
java.lang.String description,
double weight)
Constructor.
|
DateAttribute(java.lang.String name,
java.lang.String description,
double weight,
java.lang.String format)
Constructor.
|
DateAttribute(java.lang.String name,
java.lang.String description,
java.lang.String format)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.text.DateFormat |
getFormat()
Returns the date string formatter.
|
void |
setFormat(java.text.DateFormat format)
Sets the date string formatter.
|
void |
setFormat(java.lang.String format)
Sets the date format.
|
java.util.Date |
toDate(double x)
Retruns the date object from internal double encoding.
|
java.lang.String |
toString(java.util.Date date)
Generate the date string.
|
java.lang.String |
toString(double x)
Returns the string representation of a double value of this attribute.
|
double |
valueOf(java.util.Date date)
Returns the double value representation of a data object.
|
double |
valueOf(java.lang.String s)
Returns the double value of a string of this attribute.
|
public DateAttribute(java.lang.String name)
public DateAttribute(java.lang.String name,
double weight)
public DateAttribute(java.lang.String name,
java.lang.String description,
double weight)
public DateAttribute(java.lang.String name,
java.lang.String description,
java.lang.String format)
name - the name of attribute.format - the date format.public DateAttribute(java.lang.String name,
java.lang.String description,
double weight,
java.lang.String format)
name - the name of attribute.format - the date format.public java.text.DateFormat getFormat()
public void setFormat(java.lang.String format)
format - the date format string.public void setFormat(java.text.DateFormat format)
format - the date string formatter.public java.lang.String toString(java.util.Date date)
public java.util.Date toDate(double x)
x - the date in double encoding.public double valueOf(java.util.Date date)
public java.lang.String toString(double x)
AttributetoString in class Attributex - a double value of this attribute. NaN means missing value.public double valueOf(java.lang.String s)
throws java.text.ParseException
Attribute