cosc575.p1
Class AttributeFactory

java.lang.Object
  extended by cosc575.p1.AttributeFactory

public class AttributeFactory
extends java.lang.Object

A factory for making attributes from a scanner. An attribute has a name, type, and domain. Types can be discrete, numeric, or nominal.


Constructor Summary
AttributeFactory()
           
 
Method Summary
static Attribute make(java.util.Scanner scanner)
          Processes a single attribute declaration, consisting of the keyword @attribute, type, name, and, if applicable, domain.
 
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, type, name, and, if applicable, domain.

Parameters:
scanner - a scanner containing the attribute's tokens
Returns:
the constructed attribute
Throws:
java.lang.Exception - if an exception occurs