@Test public void testNumeralBases() throws Exception { final NumeralBase defaultNumeralBase = JsclMathEngine.getInstance().getNumeralBase(); try { JsclMathEngine.getInstance().setNumeralBase(NumeralBase.bin); assertEquals("101", JsclMathEngine.getInstance().evaluate("10+11")); JsclMathEngine.getInstance().setNumeralBase(NumeralBase.hex); assertEquals("56CE+CAD", preprocessor.process("56CE+CAD").getValue()); } finally { JsclMathEngine.getInstance().setNumeralBase(defaultNumeralBase); } }
@Override @Nonnull public PreparedExpression process(@Nonnull String s) throws ParseException { return processWithDepth(s, 0, new ArrayList<IConstant>(), engine); }
ToJsclTextProcessor implements TextProcessor<PreparedExpression, String> { @Override @Nonnull public PreparedExpression process(@Nonnull String s) throws ParseException { return processWithDepth(s, 0, new ArrayList<IConstant>(), engine); } }
ToJsclTextProcessor implements TextProcessor<PreparedExpression, String> { @Override @Nonnull public PreparedExpression process(@Nonnull String s) throws ParseException { return processWithDepth(s, 0, new ArrayList<IConstant>(), engine); } @Inject  ToJsclTextProcessor(); }
ToJsclTextProcessor implements TextProcessor<PreparedExpression, String> { @Override @Nonnull public PreparedExpression process(@Nonnull String s) throws ParseException { return processWithDepth(s, 0, new ArrayList<IConstant>(), engine); } @Inject  ToJsclTextProcessor(); @Override @Nonnull PreparedExpression process(@Nonnull String s); }
ToJsclTextProcessor implements TextProcessor<PreparedExpression, String> { @Override @Nonnull public PreparedExpression process(@Nonnull String s) throws ParseException { return processWithDepth(s, 0, new ArrayList<IConstant>(), engine); } @Inject  ToJsclTextProcessor(); @Override @Nonnull PreparedExpression process(@Nonnull String s);  }