⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 coercecollection.html

📁 ONGL学习的好书,介绍ONGL的相关知识
💻 HTML
字号:
<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Interpreting Objects as Collections</title><link href="../docbook.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.65.0" name="generator"><link rel="home" href="index.html" title="OGNL Language Guide"><link rel="up" href="coercion.html" title="Chapter&nbsp;5.&nbsp;Coercing Objects to Types"><link rel="previous" href="coerceInteger.html" title="Interpreting Objects as Integers"><link rel="next" href="apa.html" title="Appendix&nbsp;A.&nbsp;OGNL Language Reference"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">Interpreting Objects as Collections</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="coerceInteger.html"><img src="../images/navigation/prev.gif" alt="Prev"></a>&nbsp;</td><th align="center" width="60%">Chapter&nbsp;5.&nbsp;Coercing Objects to Types</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="apa.html"><img src="../images/navigation/next.gif" alt="Next"></a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="coerceCollection"></a>Interpreting Objects as Collections</h2></div></div><div></div></div><p>The projection and selection operators (<tt class="function">e1.{e2}</tt> and <tt class="function">e1.{?e2}</tt>), and the <tt class="function">in</tt> operator, all treat one of their arguments as a collection and walk it. This is done
            differently depending on the class of the argument:</p><div class="itemizedlist"><ul type="disc"><li><p>Java arrays are walked from front to back</p></li><li><p>Members of <tt class="classname">java.util.Collection</tt> are walked by walking their iterators</p></li><li><p>Members of <tt class="classname">java.util.Map</tt> are walked by walking iterators over their values</p></li><li><p>Members of <tt class="classname">java.util.Iterator</tt> and <tt class="classname">java.util.Enumeration</tt> are walked by iterating them</p></li><li><p>Members of <tt class="classname">java.lang.Number</tt> are "walked" by returning integers less than the given number starting with zero</p></li><li><p>All other objects are treated as singleton collections containing only themselves</p></li></ul></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="coerceInteger.html"><img src="../images/navigation/prev.gif" alt="Prev"></a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="coercion.html"><img src="../images/navigation/up.gif" alt="Up"></a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="apa.html"><img src="../images/navigation/next.gif" alt="Next"></a></td></tr><tr><td valign="top" align="left" width="40%">Interpreting Objects as Integers&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html"><img src="../images/navigation/home.gif" alt="Home"></a></td><td valign="top" align="right" width="40%">&nbsp;Appendix&nbsp;A.&nbsp;OGNL Language Reference</td></tr></table></div></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -