Codota Logo
NumberNode.toggleSign
Code IndexAdd Codota to your IDE (free)

How to use
toggleSign
method
in
org.matheclipse.parser.client.ast.NumberNode

Best Java code snippets using org.matheclipse.parser.client.ast.NumberNode.toggleSign (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: axkr/symja_android_library

private final ASTNode parsePrefixOperator(final PrefixOperator prefixOperator) {
  getNextToken();
  final ASTNode temp = parseLookaheadOperator(prefixOperator.getPrecedence());
  if ("PreMinus".equals(prefixOperator.getFunctionName()) && temp instanceof NumberNode) {
    // special cases for negative numbers
    ((NumberNode) temp).toggleSign();
    return temp;
  }
  return prefixOperator.createFunction(fFactory, temp);
}
origin: org.appdapter/ext.bundle.math.symja_jas

private ASTNode parsePrimary() {
  if (fToken == TT_OPERATOR) {
    if (fOperatorString.equals(".")) {
      fCurrentChar = '.';
      return getNumber(false);
    }
    final PrefixOperator prefixOperator = determinePrefixOperator();
    if (prefixOperator != null) {
      getNextToken();
      final ASTNode temp = parseLookaheadOperator(prefixOperator.getPrecedence());
      if (prefixOperator.getFunctionName().equals("PreMinus")) {
        // special cases for negative numbers
        if (temp instanceof NumberNode) {
          ((NumberNode) temp).toggleSign();
          return temp;
        }
      }
      return prefixOperator.createFunction(fFactory, temp);
    }
    throwSyntaxError("Operator: " + fOperatorString + " is no prefix operator.");
  }
  return getPart();
}
origin: org.refcodes/refcodes-criteria

/**
 * Parses the primary.
 * 
 * @return the AST node
 */
private ASTNode parsePrimary() {
  if ( fToken == TT_OPERATOR ) {
    final PrefixOperator prefixOperator = determinePrefixOperator();
    if ( prefixOperator != null ) {
      getNextToken();
      final ASTNode temp = parseLookaheadOperator( prefixOperator.getPrecedence() );
      if ( prefixOperator.getFunctionName().equals( "PreMinus" ) ) {
        // special cases for negative numbers
        if ( temp instanceof NumberNode ) {
          ((NumberNode) temp).toggleSign();
          return temp;
        }
      }
      return prefixOperator.createFunction( fFactory, temp );
    }
    throwSyntaxError( "Operator: " + fOperatorString + " is no prefix operator." );
  }
  return getPart();
}
org.matheclipse.parser.client.astNumberNodetoggleSign

Javadoc

Toggle the sign of the number.

Popular methods of NumberNode

  • doubleValue
    Double value.
  • hashCode
    Hash code.
  • toString
    To string.

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getExternalFilesDir (Context)
  • getContentResolver (Context)
  • orElseThrow (Optional)
  • ObjectMapper (com.fasterxml.jackson.databind)
    This mapper (or, data binder, or codec) provides functionality for converting between Java objects (
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now