aima.core.learning.framework.StringAttribute Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aima-core Show documentation
Show all versions of aima-core Show documentation
AIMA-Java Core Algorithms from the book Artificial Intelligence a Modern Approach 3rd Ed.
package aima.core.learning.framework;
/**
* @author Ravi Mohan
*
*/
public class StringAttribute implements Attribute {
private StringAttributeSpecification spec;
private String value;
public StringAttribute(String value, StringAttributeSpecification spec) {
this.spec = spec;
this.value = value;
}
public String valueAsString() {
return value.trim();
}
public String name() {
return spec.getAttributeName().trim();
}
}