表达式语言:获取最大集合的快速方法 [英] expression language: quick way to get maximum of a collection

查看:55
本文介绍了表达式语言:获取最大集合的快速方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一些标签或函数可以获取集合的最大值?

Is there some tag or function that allows to get the maximum value of a collection?

我知道我可以为此做一个for循环,但是一个衬里会更好.

I konw I can do a for loop for that, but a one liner would be better.

推荐答案

我认为您无法使用jstl或el做到这一点.

I don't think you can do that with jstl or el.

最简单的方法是使用forEach jstl标记.

The easiest is using forEach jstl tag.

没有用于查找集合最大值的标签的简单原因是,您的集合可以是任何东西. jvm如何找到学生"对象集合的最大值.

The simple reason why there are no tags for finding the maximum value of a collection is because your collection could be anything. How would the jvm find the maximum value for a collections of "Student" objects.

这篇关于表达式语言:获取最大集合的快速方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆