文件名称:eval-dist-0.5

  • 所属分类:
  • JSP源码/Java
  • 资源属性:
  • [Java] [源码]
  • 上传时间:
  • 2012-11-26
  • 文件大小:
  • 108kb
  • 下载次数:
  • 0次
  • 提 供 者:
  • dui***
  • 相关连接:
  • 下载说明:
  • 别用迅雷下载,失败请重下,重下不扣分!

介绍说明--下载内容均来自于网络,请自行研究使用

java 中没有类似javascr ipt中的eval()函数,无法直接将动态变化的字符串转换成java执行语句。此文档中提供两个jar包,和其api,使用非常简单。



Example of use:



Expression exp = new Expression("(x + y)/2")



Map<String, BigDecimal> variables = new HashMap<String, BigDecimal>()

variables.put("x", new BigDecimal("4.32"))

variables.put("y", new BigDecimal("342.1"))



BigDecimal result = exp.eval(variables)



System.out.println(result)

-java does not like the javascr ipt eval () function, can not directly change the dynamic execution of string into a java statement. This document provides two jar files, and its api, very simple to use. Example of use: Expression exp = new Expression (" (x+ y)/2" ) Map <String, BigDecimal> variables = new HashMap <String, BigDecimal> () Variables.put (" x" , new BigDecimal (" 4.32" )) variables.put (" y" , new BigDecimal (" 342.1" )) BigDecimal result = exp.eval (variables) System.out . println (result)
(系统自动生成,下载前可以参看下载内容)

下载文件列表

eval

....\doc

....\...\api

....\...\...\net

....\...\...\...\java

....\...\...\...\....\dev

....\...\...\...\....\...\eval

....\...\...\...\....\...\....\class-use

....\...\...\...\....\...\....\example

....\...\...\...\....\...\....\.......\calculator

....\...\...\...\....\...\....\.......\..........\class-use

....\...\...\resources

....\src

....\srcExamples

....\...........\net

....\...........\...\java

....\...........\...\....\dev

....\...........\...\....\...\eval

....\...........\...\....\...\....\example

....\...........\...\....\...\....\.......\calculator

....\srcTest

....\.......\net

....\.......\...\java

....\.......\...\....\dev

....\.......\...\....\...\eval

....\.......\...\....\...\....\example

....\.......\...\....\...\....\.......\calculator

....\.......\...\....\...\....\test

....\...\net

....\...\...\java

....\...\...\....\dev

....\...\...\....\...\eval

....\LICENSE

....\NOTICE

....\build.xml

....\calculator.jar

....\doc\api\allclasses-frame.html

....\...\...\allclasses-noframe.html

....\...\...\constant-values.html

....\...\...\deprecated-list.html

....\...\...\help-doc.html

....\...\...\index-all.html

....\...\...\index.html

....\...\...\net\java\dev\eval\Expression.html

....\...\...\...\....\...\....\class-use\Expression.html

....\...\...\...\....\...\....\example\calculator\Calculator.html

....\...\...\...\....\...\....\.......\..........\class-use\Calculator.html

....\...\...\...\....\...\....\.......\..........\package-frame.html

....\...\...\...\....\...\....\.......\..........\package-summary.html

....\...\...\...\....\...\....\.......\..........\package-tree.html

....\...\...\...\....\...\....\.......\..........\package-use.html

....\...\...\...\....\...\....\package-frame.html

....\...\...\...\....\...\....\package-summary.html

....\...\...\...\....\...\....\package-tree.html

....\...\...\...\....\...\....\package-use.html

....\...\...\overview-frame.html

....\...\...\overview-summary.html

....\...\...\overview-tree.html

....\...\...\package-list

....\...\...\resources\inherit.gif

....\...\...\stylesheet.css

....\eval-0.5.jar

....\srcExamples\net\java\dev\eval\example\calculator\Calculator.java

....\...........\...\....\...\....\.......\..........\package.html

....\...Test\net\java\dev\eval\example\calculator\CalculatorTest.java

....\.......\...\....\...\....\test\ExpressionTest.java

....\...\net\java\dev\eval\Compiler.java

....\...\...\....\...\....\Expression.java

....\...\...\....\...\....\Operation.java

....\...\...\....\...\....\Operator.java

....\...\...\....\...\....\Tokeniser.java

....\...\...\....\...\....\Type.java

....\...\...\....\...\....\package.html

....\...\overview.html

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度更多...
  • 请直接用浏览器下载本站内容,不要使用迅雷之类的下载软件,用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.

相关评论

暂无评论内容.

发表评论

*主  题:
*内  容:
*验 证 码:

源码中国 www.ymcn.org