differences.html
来自「ONGL学习的好书,介绍ONGL的相关知识」· HTML 代码 · 共 3 行
HTML
3 行
<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Operators that differ from Java's operators</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="basicExpressions.html" title="Chapter 4. Expressions"><link rel="previous" href="specialCollectionsProperties.html" title="Pseudo-Properties for Collections"><link rel="next" href="settingVersusGetting.html" title="Setting values versus getting values"></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">Operators that differ from Java's operators</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="specialCollectionsProperties.html"><img src="../images/navigation/prev.gif" alt="Prev"></a> </td><th align="center" width="60%">Chapter 4. Expressions</th><td align="right" width="20%"> <a accesskey="n" href="settingVersusGetting.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="differences"></a>Operators that differ from Java's operators</h2></div></div><div></div></div><p>For the most part, <span class="acronym">OGNL</span>'s operators are borrowed from Java and work similarly to Java's operators. See the <span class="acronym">OGNL</span> Reference for a complete discussion. Here we describe <span class="acronym">OGNL</span>
operators that are not in Java, or that are different from Java.</p><div class="itemizedlist"><ul type="disc"><li><p>The comma (,) or sequence operator. This operator is borrowed from C. The comma is used to separate two independent expressions. The value of the second of these expressions is the value of the comma expression. Here is an
example:</p><pre class="programlisting">ensureLoaded(), name</pre><p>When this expression is evaluated, the ensureLoaded method is called (presumably to make sure that all parts of the object are in memory), then the name property is retrieved (if getting the value) or replaced (if setting).</p></li><li><p>List construction with curly braces ({}). You can create a list in-line by enclosing the values in curly braces, as in this example:</p><pre class="programlisting">{ null, true, false }</pre></li><li><p>The <tt class="function">in</tt> operator (and <tt class="function">not in</tt>, its negation). This is a containment test, to see if a value is in a collection. For example,</p><pre class="programlisting">name in {null,"Untitled"} || name</pre></li><li><p>See the <span class="acronym">OGNL</span> reference for a full list of operations</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="specialCollectionsProperties.html"><img src="../images/navigation/prev.gif" alt="Prev"></a> </td><td align="center" width="20%"><a accesskey="u" href="basicExpressions.html"><img src="../images/navigation/up.gif" alt="Up"></a></td><td align="right" width="40%"> <a accesskey="n" href="settingVersusGetting.html"><img src="../images/navigation/next.gif" alt="Next"></a></td></tr><tr><td valign="top" align="left" width="40%">Pseudo-Properties for Collections </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%"> Setting values versus getting values</td></tr></table></div></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?