view
Class PolygonFactory

java.lang.Object
  extended by view.PolygonFactory

public class PolygonFactory
extends Object

This class opens and reads the file stated in its constructor call and tries to convert one-line entries into Polygons. A one-line entry is converted into a Polygon via this method:

See Also:
StringTokenizer

Nested Class Summary
(package private)  class PolygonFactory.UnitTester
          For testing the PolygonFactory class.
(package private)  class PolygonFactory.UnitTester2
          Extends the tests.
 
Field Summary
 Polygon[] Shape
           
 
Constructor Summary
PolygonFactory()
           
PolygonFactory(File config)
          Constructs a new PolygonFactory.
 
Method Summary
static void main(String[] arg)
          For testing purposes only.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Shape

public Polygon[] Shape
Constructor Detail

PolygonFactory

public PolygonFactory()

PolygonFactory

public PolygonFactory(File config)
Constructs a new PolygonFactory. On construct, the config file is opened and read. The Polygons are fed into the Shape variable as they are found in the file.

Method Detail

main

public static void main(String[] arg)
For testing purposes only. A new PolygonFactory is constructed from the first command line argument and piped through to a tester unit. Overriding this testing units provide a way to implement various tests on the outer class without enlarging its bytesize.