public class DateAttribute extends Attribute
Attribute.Typedescription, name, type, weight| Constructor and Description |
|---|
DateAttribute(String name)
Constructor.
|
DateAttribute(String name,
double weight)
Constructor.
|
DateAttribute(String name,
String description,
double weight)
Constructor.
|
DateAttribute(String name,
String description,
double weight,
String format)
Constructor.
|
DateAttribute(String name,
String description,
String format)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
DateFormat |
getFormat()
Returns the date string formatter.
|
void |
setFormat(DateFormat format)
Sets the date string formatter.
|
void |
setFormat(String format)
Sets the date format.
|
String |
toString(Date date)
Generate the date string.
|
String |
toString(double x)
Returns the string representation of a double value of this attribute.
|
double |
valueOf(Date date)
Returns the double value representation of a data object.
|
double |
valueOf(String s)
Returns the double value of a string of this attribute.
|
public DateAttribute(String name)
public DateAttribute(String name, double weight)
public DateAttribute(String name, String description, String format)
name - the name of attribute.format - the date format.public DateFormat getFormat()
public void setFormat(String format)
format - the date format string.public void setFormat(DateFormat format)
format - the date string formatter.public double valueOf(Date date)
public String toString(double x)
AttributetoString in class Attributex - a double value of this attribute. NaN means missing value.public double valueOf(String s) throws ParseException
AttributevalueOf in class Attributes - a string value of this attribute.ParseExceptionCopyright © 2015. All rights reserved.