cox.jmatt.java.MathTools.graphing.noop
Class NOGraphEngine

java.lang.Object
  extended by cox.jmatt.java.MathTools.graphing.noop.NOGraphEngine
All Implemented Interfaces:
GraphEngine
Direct Known Subclasses:
GraphEnginePDK

public class NOGraphEngine
extends java.lang.Object
implements GraphEngine

This class serves two purposes. First of all it acts as a 'null' GraphEngine. It is fully functional as such but all instances it returns are classes from the graphing.noop package.

Its second and perhaps most useful purpose is to act as a base class for implementations to extend. Not all implementations will require or furnish all Renderable classes, yet GraphHandler demands non-null instances or it might choke. Implementations for which this is the case (e.g. graphing.Graph) can subclass this for their base GraphEngine and only override what they need.


Constructor Summary
NOGraphEngine()
          Simple constructor.
 
Method Summary
 Axis getAxis(java.lang.Object pKey)
          Create and return a NOAxis.
 Graphable getGraph(java.lang.Object pKey)
          Create and return a NOGraphable.
 GraphKeys getGraphKeys()
          Return null.
 GraphPaper getGraphPaper(java.lang.Object pKey)
          Return a NOGraphPaper instance.
 Polygon getPolygon(java.lang.Object pKey)
          Return a NOPolygon.
 boolean setFeature(java.lang.String pFeature, java.lang.Object pValue)
          Always returns false.
 boolean testFeature(java.lang.String pFeature)
          Always returns false.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NOGraphEngine

public NOGraphEngine()
Simple constructor.

Method Detail

getGraphPaper

public GraphPaper getGraphPaper(java.lang.Object pKey)
Return a NOGraphPaper instance.

Specified by:
getGraphPaper in interface GraphEngine

getAxis

public Axis getAxis(java.lang.Object pKey)
Create and return a NOAxis.

Specified by:
getAxis in interface GraphEngine

getGraph

public Graphable getGraph(java.lang.Object pKey)
Create and return a NOGraphable.

Specified by:
getGraph in interface GraphEngine

getGraphKeys

public GraphKeys getGraphKeys()
Return null. Always.

Specified by:
getGraphKeys in interface GraphEngine

getPolygon

public Polygon getPolygon(java.lang.Object pKey)
Return a NOPolygon.

Specified by:
getPolygon in interface GraphEngine

setFeature

public boolean setFeature(java.lang.String pFeature,
                          java.lang.Object pValue)
Always returns false.

Specified by:
setFeature in interface GraphEngine
Parameters:
pFeature - The String name of the feature to be set.
pValue - The value the feature is to have.
Returns:
true if the feature is set, false if it does not apply or is not set for whatever reason.

testFeature

public boolean testFeature(java.lang.String pFeature)
Always returns false.

Specified by:
testFeature in interface GraphEngine
Parameters:
pFeature - The name of the feature to test.
Returns:
true if the feature is set, false otherwise.