/usr/share/doc/libognl-java/LanguageGuide/coercion.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 | <html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 5. Coercing Objects to Types</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="index.html" title="OGNL Language Guide"><link rel="prev" href="settingVersusGetting.html" title="Setting values versus getting values"><link rel="next" href="coerceNumber.html" title="Interpreting Objects as Numbers"></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">Chapter 5. Coercing Objects to Types</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="settingVersusGetting.html"><img src="../images/navigation/prev.gif" alt="Prev"></a> </td><th align="center" width="60%"> </th><td align="right" width="20%"> <a accesskey="n" href="coerceNumber.html"><img src="../images/navigation/next.gif" alt="Next"></a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a name="coercion"></a>Chapter 5. Coercing Objects to Types</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="section"><a href="coercion.html#coerceBoolean">Interpreting Objects as Booleans</a></span></dt><dt><span class="section"><a href="coerceNumber.html">Interpreting Objects as Numbers</a></span></dt><dt><span class="section"><a href="coerceInteger.html">Interpreting Objects as Integers</a></span></dt><dt><span class="section"><a href="coerceCollection.html">Interpreting Objects as Collections</a></span></dt></dl></div><p>Here we describe how <acronym class="acronym">OGNL</acronym> interprets objects as various types. See below for how <acronym class="acronym">OGNL</acronym> coerces objects to booleans, numbers, integers, and collections.</p><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="coerceBoolean"></a>Interpreting Objects as Booleans</h2></div></div></div><p>Any object can be used where a boolean is required. <acronym class="acronym">OGNL</acronym> interprets objects as booleans like this:</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>If the object is a <code class="classname">Boolean</code>, its value is extracted and returned</p></li><li class="listitem"><p>If the object is a <code class="classname">Number</code>, its double-precision floating-point value is compared with zero; non-zero is treated as <code class="constant">true</code>, zero as <code class="constant">false</code>.</p></li><li class="listitem"><p>If the object is a <code class="classname">Character</code>, its boolean value is <code class="constant">true</code> if and only if its char value is non-zero.</p></li><li class="listitem"><p>Otherwise, its boolean value is <code class="constant">true</code> if and only if it is non-<code class="constant">null</code>.</p></li></ul></div></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="settingVersusGetting.html"><img src="../images/navigation/prev.gif" alt="Prev"></a> </td><td align="center" width="20%"> </td><td align="right" width="40%"> <a accesskey="n" href="coerceNumber.html"><img src="../images/navigation/next.gif" alt="Next"></a></td></tr><tr><td valign="top" align="left" width="40%">Setting values versus getting values </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%"> Interpreting Objects as Numbers</td></tr></table></div></body></html>
|