Class OperatorTest

All Implemented Interfaces:
BiPredicate<IToken,ISymbol>
Direct Known Subclasses:
ComparatorPresentOrError, DecrementPresentOrError, HashCodePresentOrError, IncrementPresentOrError, IsSetPresentOrError

abstract class OperatorTest extends TypedSymbolAccess implements BiPredicate<IToken,ISymbol>
Provides a common set of operations for checking operators.
  • Constructor Details

  • Method Details

    • getMethodSymbolSearch

      protected abstract MethodSymbolSearch getMethodSymbolSearch(ISymbol symbolType)
    • getSymbolType

      protected Optional<ISymbol> getSymbolType(ISymbol symbol)
    • isOperatorPresent

      protected boolean isOperatorPresent(CheckOperatorData data)
    • decidedForType

      protected Optional<Boolean> decidedForType(ISymbol symbolType)
      THE step test(IToken, ISymbol) and testType(IToken, ISymbol) both take before searching for the operator: a type for which this operator is decided without a search (for '?': a function, Any, text, an enumeration). Empty means search.
    • notAnEnumerationTypeOrError

      public boolean notAnEnumerationTypeOrError(IToken operatorUse, ISymbol operand)
      Is this operand a value rather than the enumeration TYPE itself? E07630 when it is the type. For the operators that then judge their operands' common TYPE with testType(IToken, ISymbol).
    • testType

      public boolean testType(IToken operatorUse, ISymbol type)
      As test(IToken, ISymbol), for a TYPE rather than a value of it - e.g. a stream stage that only knows the element type, or a coalescing operator judging its operands' common type.
    • test

      public boolean test(IToken operatorUse, ISymbol symbol)
      Specified by:
      test in interface BiPredicate<IToken,ISymbol>