We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
版本 v4.2.8
执行以下表达式 list = seq.list(2);list[0] = 3;list[0]
结果返回2
The text was updated successfully, but these errors were encountered:
目前还不支持类似 x[i]=y 这样的赋值,你可以暂时通过导入 List 类的实例方法来解决这个需求:
x[i]=y
List
AviatorEvaluator.addInstanceFunctions("list", List.class); Long result = (Long) AviatorEvaluator.execute("list = seq.list(2);list.set(list, 0, 3);list[0]"); System.out.println(result);
调用了 List#set(index, value) 方法
List#set(index, value)
导入函数可以参见文档
https://github.com/killme2008/aviator/wiki/%E8%B0%83%E7%94%A8-Java-%E6%96%B9%E6%B3%95%E5%92%8C-Function-Missing
Sorry, something went wrong.
(feat) Supports sequence element assignment, #187
52ee9bf
发布了 4.2.9(可能要等一段时间才能从 maven central 同步到),已支持 x[i] = y 这样的数组或者 List 赋值。
x[i] = y
https://github.com/killme2008/aviator/releases/tag/aviator-4.2.9
No branches or pull requests
版本 v4.2.8
执行以下表达式
list = seq.list(2);list[0] = 3;list[0]
结果返回2
The text was updated successfully, but these errors were encountered: