This file is indexed.

/usr/share/doc/libognl-java/LanguageGuide/collectionConstruction.html is in libognl-java-doc 2.7.3-5.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

1
2
<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Collection Construction</title><link href="../docbook.css" type="text/css" rel="stylesheet"><meta content="DocBook XSL Stylesheets V1.78.1" name="generator"><link rel="home" href="index.html" title="OGNL Language Guide"><link rel="up" href="basicExpressions.html" title="Chapter&nbsp;4.&nbsp;Expressions"><link rel="prev" href="chainedSubexpressions.html" title="Chained Subexpressions"><link rel="next" href="projection.html" title="Projecting Across Collections"></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">Collection Construction</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="chainedSubexpressions.html"><img src="../images/navigation/prev.gif" alt="Prev"></a>&nbsp;</td><th align="center" width="60%">Chapter&nbsp;4.&nbsp;Expressions</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="projection.html"><img src="../images/navigation/next.gif" alt="Next"></a></td></tr></table><hr></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="collectionConstruction"></a>Collection Construction</h2></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="listConstruction"></a>Lists</h3></div></div></div><p>To create a list of objects, enclose a list of expressions in curly braces. As with method arguments, these expressions cannot use the comma operator unless it is enclosed in parentheses. Here is an example:</p><pre class="programlisting">name in { null,"Untitled" }</pre><p>This tests whether the <code class="varname">name</code> property is <code class="constant">null</code> or equal to <code class="constant">"Untitled"</code>.</p><p>The syntax described above will create a instanceof the <code class="classname">List</code> interface. The exact subclass is not defined.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="nativeArrayConstruction"></a>Native Arrays</h3></div></div></div><p>Sometimes you want to create Java native arrays, such as <span class="type">int[]</span> or <span class="type">Integer[]</span>. <acronym class="acronym">OGNL</acronym> supports the creation of these similarly to the way that constructors are normally called, but allows
                initialization of the native array from either an existing list or a given size of the array.</p><pre class="programlisting">new int[] { 1, 2, 3 }</pre><p>This creates a new <span class="type">int</span> array consisting of three integers 1, 2 and 3.</p><p>To create an array with all <code class="constant">null</code> or <code class="constant">0</code> elements, use the alternative size constructor</p><pre class="programlisting">new int[5]</pre><p>This creates an <span class="type">int</span> array with 5 slots, all initialized to zero.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="mapConstruction"></a>Maps</h3></div></div></div><p>Maps can also be created using a special syntax.</p><pre class="programlisting">#{ "foo" : "foo value", "bar" : "bar value" }</pre><p>This creates a Map initialized with mappings for <code class="literal">"foo"</code> and <code class="literal">"bar"</code>.</p><p>Advanced users who wish to select the specific Map class can specify that class before the opening curly brace</p><pre class="programlisting">#@java.util.LinkedHashMap@{ "foo" : "foo value", "bar" : "bar value" }</pre><p>The above example will create an instance of the JDK 1.4 class <code class="classname">LinkedHashMap</code>, ensuring the the insertion order of the elements is preserved.</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="chainedSubexpressions.html"><img src="../images/navigation/prev.gif" alt="Prev"></a>&nbsp;</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%">&nbsp;<a accesskey="n" href="projection.html"><img src="../images/navigation/next.gif" alt="Next"></a></td></tr><tr><td valign="top" align="left" width="40%">Chained Subexpressions&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;Projecting Across Collections</td></tr></table></div></body></html>