public class Schedule
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
(package private) class |
Schedule.Node |
Modifier and Type | Field and Description |
---|---|
private int |
primeCount |
private java.lang.String |
scheduleInfixStr |
private java.lang.String |
schedulePostfixStr |
private Schedule.Node |
scheduleRootNode |
Constructor and Description |
---|
Schedule() |
Modifier and Type | Method and Description |
---|---|
boolean |
compareTo(Schedule anotherSchedule)
Compare two schedules.
|
private void |
constructScheduleTreeFromPostfix(java.lang.String x)
Construct the Schedule Tree from the PostFix Schedule
expression.
|
private int |
evaluatePostfix(java.lang.String x) |
private int |
getPrimeNumber() |
private java.lang.String |
InfixToPostfix(java.lang.String x) |
void |
parseScheduleString(java.lang.String schedule) |
private static int |
priority(java.lang.Object x) |
java.lang.String |
toString() |
private java.lang.String |
toString(Schedule.Node tree)
Returns a one-line string representation of the given subtree.
|
private boolean |
validateParantheses(java.lang.String string)
This function will check if the parentheses in the expression have
matching number of open and closed brackets.
|
private java.lang.String scheduleInfixStr
private java.lang.String schedulePostfixStr
private Schedule.Node scheduleRootNode
private int primeCount
private int getPrimeNumber()
public boolean compareTo(Schedule anotherSchedule)
private int evaluatePostfix(java.lang.String x)
public java.lang.String toString()
toString
in class java.lang.Object
private java.lang.String toString(Schedule.Node tree)
private void constructScheduleTreeFromPostfix(java.lang.String x)
private static int priority(java.lang.Object x)
private java.lang.String InfixToPostfix(java.lang.String x)
private boolean validateParantheses(java.lang.String string)
public void parseScheduleString(java.lang.String schedule)