Class AttributeFactory


  • public class AttributeFactory
    extends java.lang.Object
    A factory for making NominalAttributes and NumericAttributes from a scanner.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Attribute make​(java.util.Scanner scanner)
      Processes a single attribute declaration, consisting of the keyword @attribute, name, and either the keyword numeric or a list of nominal values.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AttributeFactory

        public AttributeFactory()
    • Method Detail

      • make

        public static Attribute make​(java.util.Scanner scanner)
                              throws java.lang.Exception
        Processes a single attribute declaration, consisting of the keyword @attribute, name, and either the keyword numeric or a list of nominal values.
        Parameters:
        scanner - a scanner containing the attribute's tokens
        Returns:
        the constructed attribute
        Throws:
        java.lang.Exception - if a parse exception occurs