001    /*
002     * Created on Aug 5, 2005
003     *
004     */
005    package aima.learning.framework;
006    
007    /**
008     * @author Ravi Mohan
009     * 
010     */
011    
012    public class StringAttribute implements Attribute {
013            private StringAttributeSpecification spec;
014    
015            private String value;
016    
017            public StringAttribute(String value, StringAttributeSpecification spec) {
018                    this.spec = spec;
019                    this.value = value;
020            }
021    
022            public String valueAsString() {
023                    return value.trim();
024            }
025    
026            public String name() {
027                    return spec.getAttributeName().trim();
028            }
029    
030    }