Class GridExpressionParser
java.lang.Object
com.github.gbenroscience.math.graph.GridExpressionParser
Objects of this class take a compound plot instruction, scan it into all
smaller plot instructions, and then analyze each instruction to determine its
type. They store a record of each smaller plot instruction in an ArrayList of
GraphElement objects- Author:
- JIBOYE Oluwagbemiro Olaoluwa
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidstatic GraphTypedetermineType(String input) getInput()booleanfinal voidscan(Grid.GraphDataSharer dataSharer) Isolates each complete plottable instruction.voidsetCanPlot(boolean canPlot) voidsetGraphElements(ArrayList<GraphElement> graphElements) voidsetInput(String input, Grid.GraphDataSharer dataSharer)
-
Field Details
-
lock
-
-
Constructor Details
-
Method Details
-
getInput
-
setCanPlot
public void setCanPlot(boolean canPlot) -
isCanPlot
public boolean isCanPlot() -
determineType
- Parameters:
input- The input plot instruction.- Returns:
- the type of GraphType that input represents.
- Throws:
NullPointerException
-
setGraphElements
-
getGraphElements
-
getFirstFunctionPlotTypeGraphElement
- Returns:
- the first
GraphElementthat is of typeGraphType.FunctionPlot
-
addFunctions
- Parameters:
gep- Another GridExpressionParser object. Appends the function definitions in the other GridExpressionParser object to the functions in this one.