Class Attribute<T>

java.lang.Object
com.groiss.ml.ds.Attribute<T>
Direct Known Subclasses:
NominalAttribute, NumericAttribute

public abstract class Attribute<T> extends Object
Objects of this class represent the columns in a DataSet.
  • Constructor Details

    • Attribute

      public Attribute(String name, Class<T> clazz)
      Creates a new attribute with the given name and class .
      Parameters:
      name - the name of this attribute
      clazz - the class of the values represented by this attribute
  • Method Details

    • toARFFString

      public String toARFFString()
      Returns the ARFF representation of this attribute.
      Returns:
      a string representing the data in ARFF.
    • getARFFValues

      protected abstract String getARFFValues()
      Returns the values supported by this attribute as ARFF string
      Returns:
      the supported values as ARFF string
    • getName

      public String getName()
      Returns the name of the attribute represented by this instance
      Returns:
      the attribute's name
    • getClazz

      public Class<? extends T> getClazz()
      Returns the class of the values represented by this attribute.
      Returns:
      the attribute's value class
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object