使用contains函数即可判断false、true
boolean java.util.List.contains(Object o)
Returns true if this list contains the specified element. More formally, returns true if and only if this list contains at least one element e such that (o == null ? e == null : o.equals(e)).
样例
#foreach($status in $map.order)
<option value="$status" #if($!map.orderSelection.contains($status)) selected = "selected" #end>
$!{orderStatus.getDesc($!{status})}
</option>
#end
随手记账单小程序 期待大家的反馈


博客提及随手记账单小程序并期待反馈,还介绍了Java中List的contains函数,该函数用于判断列表是否包含指定元素,返回布尔值,并给出了函数的详细说明。
19万+

被折叠的 条评论
为什么被折叠?



