Class Attribute

    • Field Detail

      • ARFF_ATTRIBUTE

        public static final String ARFF_ATTRIBUTE
        The keyword used to denote the start of an arff attribute declaration
        See Also:
        Constant Field Values
      • ARFF_ATTRIBUTE_INTEGER

        public static final String ARFF_ATTRIBUTE_INTEGER
        A keyword used to denote a numeric attribute
        See Also:
        Constant Field Values
      • ARFF_ATTRIBUTE_REAL

        public static final String ARFF_ATTRIBUTE_REAL
        A keyword used to denote a numeric attribute
        See Also:
        Constant Field Values
      • ARFF_ATTRIBUTE_NUMERIC

        public static final String ARFF_ATTRIBUTE_NUMERIC
        A keyword used to denote a numeric attribute
        See Also:
        Constant Field Values
      • ARFF_ATTRIBUTE_STRING

        public static final String ARFF_ATTRIBUTE_STRING
        The keyword used to denote a string attribute
        See Also:
        Constant Field Values
      • ARFF_ATTRIBUTE_DATE

        public static final String ARFF_ATTRIBUTE_DATE
        The keyword used to denote a date attribute
        See Also:
        Constant Field Values
      • ARFF_ATTRIBUTE_RELATIONAL

        public static final String ARFF_ATTRIBUTE_RELATIONAL
        The keyword used to denote a relation-valued attribute
        See Also:
        Constant Field Values
      • ARFF_END_SUBRELATION

        public static final String ARFF_END_SUBRELATION
        The keyword used to denote the end of the declaration of a subrelation
        See Also:
        Constant Field Values
      • isNominal

        protected boolean isNominal
        The is nominal.
      • isNumeric

        protected boolean isNumeric
        The is numeric.
      • isDate

        protected boolean isDate
        The is date.
      • m_DateFormat

        protected SimpleDateFormat m_DateFormat
        Date format specification for date attributes
      • name

        protected String name
        The name.
      • attributeValues

        protected List<String> attributeValues
        The attribute values.
    • Constructor Detail

      • Attribute

        public Attribute​(String string)
        Instantiates a new attribute.
        Parameters:
        string - the string
      • Attribute

        public Attribute​(String attributeName,
                         List<String> attributeValues)
        Instantiates a new attribute.
        Parameters:
        attributeName - the attribute name
        attributeValues - the attribute values
      • Attribute

        public Attribute​(String attributeName,
                         String dateFormat)
        Instantiates a new attribute.
        Parameters:
        attributeName - the attribute name
        dateFormat - the format of the date used
      • Attribute

        public Attribute()
        Instantiates a new attribute.
    • Method Detail

      • getAttributeValues

        public List<String> getAttributeValues()
        Gets the attribute values.
        Returns:
        the attribute values
      • isNominal

        public boolean isNominal()
        Checks if is nominal.
        Returns:
        true, if is nominal
      • name

        public String name()
        Name.
        Returns:
        the string
      • value

        public String value​(int value)
        Value.
        Parameters:
        value - the value
        Returns:
        the string
      • isNumeric

        public boolean isNumeric()
        Checks if is numeric.
        Returns:
        true, if is numeric
      • numValues

        public int numValues()
        Num values.
        Returns:
        the int
      • indexOfValue

        public final int indexOfValue​(String value)
        Index of value.
        Parameters:
        value - the value
        Returns:
        the int
      • toString

        public final String toString()
        Returns a description of this attribute in ARFF format. Quotes strings if they contain whitespace characters, or if they are a question mark.
        Overrides:
        toString in class Object
        Returns:
        a description of this attribute as a string
      • enumerateValues

        public final Enumeration enumerateValues()
        Returns an enumeration of all the attribute's values if the attribute is nominal, null otherwise.
        Returns:
        enumeration of all the attribute's values