private PostfixCalculator convertToPostfix ( ) { if ( postfix == null || postfix . size ( ) == 0 || isInfixChanged ) { postfixCalculator . toPostfix ( infix ) ; postfix = postfixCalculator . getPostfix ( ) ; isInfixChanged = false ; } return postfixCalculator ; }
Convert infix to postfix Conversion is made only first time or after any change in structure of infix expression