public class StringAttribute extends Attribute
Attribute.Typedescription, name, type, weight| Constructor and Description |
|---|
StringAttribute(String name)
Constructor.
|
StringAttribute(String name,
double weight)
Constructor.
|
StringAttribute(String name,
String description,
double weight)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isOpen()
Returns true if the string values of the nominal attribute is a open set.
|
void |
setOpen(boolean open)
Sets if the string values of the nominal attribute is a open set.
|
String |
toString(double x)
Returns the string representation of a double value of this attribute.
|
double |
valueOf(String s)
Returns the double value of a string of this attribute.
|
List<String> |
values()
Returns the list of string values of this attribute.
|
public StringAttribute(String name)
name - the name of attribute.public StringAttribute(String name, double weight)
name - the name of attribute.public List<String> values()
public boolean isOpen()
public void setOpen(boolean open)
open - true if the string values of the nominal attribute is a open set.public double valueOf(String s) throws ParseException
AttributevalueOf in class Attributes - a string value of this attribute.ParseExceptionpublic String toString(double x)
AttributetoString in class Attributex - a double value of this attribute. NaN means missing value.Copyright © 2015. All rights reserved.