1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2<!-- NewPage --> 3<html lang="en"> 4<head> 5<!-- Generated by javadoc (version 1.7.0_79) on Tue Jan 23 20:10:06 PST 2018 --> 6<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 7<title>OptBoolean (Jackson-annotations 2.9.0 API)</title> 8<meta name="date" content="2018-01-23"> 9<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> 10</head> 11<body> 12<script type="text/javascript"><!-- 13 if (location.href.indexOf('is-external=true') == -1) { 14 parent.document.title="OptBoolean (Jackson-annotations 2.9.0 API)"; 15 } 16//--> 17</script> 18<noscript> 19<div>JavaScript is disabled on your browser.</div> 20</noscript> 21<!-- ========= START OF TOP NAVBAR ======= --> 22<div class="topNav"><a name="navbar_top"> 23<!-- --> 24</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> 25<!-- --> 26</a> 27<ul class="navList" title="Navigation"> 28<li><a href="../../../../com/fasterxml/jackson/annotation/package-summary.html">Package</a></li> 29<li class="navBarCell1Rev">Class</li> 30<li><a href="class-use/OptBoolean.html">Use</a></li> 31<li><a href="package-tree.html">Tree</a></li> 32<li><a href="../../../../deprecated-list.html">Deprecated</a></li> 33<li><a href="../../../../index-all.html">Index</a></li> 34<li><a href="../../../../help-doc.html">Help</a></li> 35</ul> 36</div> 37<div class="subNav"> 38<ul class="navList"> 39<li><a href="../../../../com/fasterxml/jackson/annotation/ObjectIdResolver.html" title="interface in com.fasterxml.jackson.annotation"><span class="strong">Prev Class</span></a></li> 40<li><a href="../../../../com/fasterxml/jackson/annotation/PropertyAccessor.html" title="enum in com.fasterxml.jackson.annotation"><span class="strong">Next Class</span></a></li> 41</ul> 42<ul class="navList"> 43<li><a href="../../../../index.html?com/fasterxml/jackson/annotation/OptBoolean.html" target="_top">Frames</a></li> 44<li><a href="OptBoolean.html" target="_top">No Frames</a></li> 45</ul> 46<ul class="navList" id="allclasses_navbar_top"> 47<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> 48</ul> 49<div> 50<script type="text/javascript"><!-- 51 allClassesLink = document.getElementById("allclasses_navbar_top"); 52 if(window==top) { 53 allClassesLink.style.display = "block"; 54 } 55 else { 56 allClassesLink.style.display = "none"; 57 } 58 //--> 59</script> 60</div> 61<div> 62<ul class="subNavList"> 63<li>Summary: </li> 64<li>Nested | </li> 65<li><a href="#enum_constant_summary">Enum Constants</a> | </li> 66<li>Field | </li> 67<li><a href="#method_summary">Method</a></li> 68</ul> 69<ul class="subNavList"> 70<li>Detail: </li> 71<li><a href="#enum_constant_detail">Enum Constants</a> | </li> 72<li>Field | </li> 73<li><a href="#method_detail">Method</a></li> 74</ul> 75</div> 76<a name="skip-navbar_top"> 77<!-- --> 78</a></div> 79<!-- ========= END OF TOP NAVBAR ========= --> 80<!-- ======== START OF CLASS DATA ======== --> 81<div class="header"> 82<div class="subTitle">com.fasterxml.jackson.annotation</div> 83<h2 title="Enum OptBoolean" class="title">Enum OptBoolean</h2> 84</div> 85<div class="contentContainer"> 86<ul class="inheritance"> 87<li><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> 88<li> 89<ul class="inheritance"> 90<li><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">java.lang.Enum</a><<a href="../../../../com/fasterxml/jackson/annotation/OptBoolean.html" title="enum in com.fasterxml.jackson.annotation">OptBoolean</a>></li> 91<li> 92<ul class="inheritance"> 93<li>com.fasterxml.jackson.annotation.OptBoolean</li> 94</ul> 95</li> 96</ul> 97</li> 98</ul> 99<div class="description"> 100<ul class="blockList"> 101<li class="blockList"> 102<dl> 103<dt>All Implemented Interfaces:</dt> 104<dd><a href="http://docs.oracle.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang">Comparable</a><<a href="../../../../com/fasterxml/jackson/annotation/OptBoolean.html" title="enum in com.fasterxml.jackson.annotation">OptBoolean</a>></dd> 105</dl> 106<hr> 107<br> 108<pre>public enum <span class="strong">OptBoolean</span> 109extends <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</a><<a href="../../../../com/fasterxml/jackson/annotation/OptBoolean.html" title="enum in com.fasterxml.jackson.annotation">OptBoolean</a>></pre> 110<div class="block">Optional Boolean value ("nullean"). Needed just because Java annotations 111 can not take 'null' as a value (even as default), so there is no 112 way to distinguish between explicit `true` and `false`, and lack of 113 choice (related: annotations are limited to primitives, so 114 <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Boolean.html?is-external=true" title="class or interface in java.lang"><code>Boolean</code></a> not allowed as solution). 115<p> 116 Note: although use of `true` and `false` would be more convenient, they 117 can not be chosen since they are Java keyword and compiler won't allow 118 the choice. And since enum naming convention suggests all-upper-case, 119 that is what is done here.</div> 120<dl><dt><span class="strong">Since:</span></dt> 121 <dd>2.6</dd></dl> 122</li> 123</ul> 124</div> 125<div class="summary"> 126<ul class="blockList"> 127<li class="blockList"> 128<!-- =========== ENUM CONSTANT SUMMARY =========== --> 129<ul class="blockList"> 130<li class="blockList"><a name="enum_constant_summary"> 131<!-- --> 132</a> 133<h3>Enum Constant Summary</h3> 134<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Enum Constant Summary table, listing enum constants, and an explanation"> 135<caption><span>Enum Constants</span><span class="tabEnd"> </span></caption> 136<tr> 137<th class="colOne" scope="col">Enum Constant and Description</th> 138</tr> 139<tr class="altColor"> 140<td class="colOne"><code><strong><a href="../../../../com/fasterxml/jackson/annotation/OptBoolean.html#DEFAULT">DEFAULT</a></strong></code> 141<div class="block">Value that indicates that the annotation property does NOT have an explicit 142 definition of enabled/disabled (or true/false); instead, a higher-level 143 configuration value is used; or lacking higher-level global setting, 144 default.</div> 145</td> 146</tr> 147<tr class="rowColor"> 148<td class="colOne"><code><strong><a href="../../../../com/fasterxml/jackson/annotation/OptBoolean.html#FALSE">FALSE</a></strong></code> 149<div class="block">Value that indicates that the annotation property is explicitly defined to 150 be disabled, or false.</div> 151</td> 152</tr> 153<tr class="altColor"> 154<td class="colOne"><code><strong><a href="../../../../com/fasterxml/jackson/annotation/OptBoolean.html#TRUE">TRUE</a></strong></code> 155<div class="block">Value that indicates that the annotation property is explicitly defined to 156 be enabled, or true.</div> 157</td> 158</tr> 159</table> 160</li> 161</ul> 162<!-- ========== METHOD SUMMARY =========== --> 163<ul class="blockList"> 164<li class="blockList"><a name="method_summary"> 165<!-- --> 166</a> 167<h3>Method Summary</h3> 168<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> 169<caption><span>Methods</span><span class="tabEnd"> </span></caption> 170<tr> 171<th class="colFirst" scope="col">Modifier and Type</th> 172<th class="colLast" scope="col">Method and Description</th> 173</tr> 174<tr class="altColor"> 175<td class="colFirst"><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Boolean.html?is-external=true" title="class or interface in java.lang">Boolean</a></code></td> 176<td class="colLast"><code><strong><a href="../../../../com/fasterxml/jackson/annotation/OptBoolean.html#asBoolean()">asBoolean</a></strong>()</code> </td> 177</tr> 178<tr class="rowColor"> 179<td class="colFirst"><code>boolean</code></td> 180<td class="colLast"><code><strong><a href="../../../../com/fasterxml/jackson/annotation/OptBoolean.html#asPrimitive()">asPrimitive</a></strong>()</code> </td> 181</tr> 182<tr class="altColor"> 183<td class="colFirst"><code>static boolean</code></td> 184<td class="colLast"><code><strong><a href="../../../../com/fasterxml/jackson/annotation/OptBoolean.html#equals(java.lang.Boolean,%20java.lang.Boolean)">equals</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Boolean.html?is-external=true" title="class or interface in java.lang">Boolean</a> b1, 185 <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Boolean.html?is-external=true" title="class or interface in java.lang">Boolean</a> b2)</code> </td> 186</tr> 187<tr class="rowColor"> 188<td class="colFirst"><code>static <a href="../../../../com/fasterxml/jackson/annotation/OptBoolean.html" title="enum in com.fasterxml.jackson.annotation">OptBoolean</a></code></td> 189<td class="colLast"><code><strong><a href="../../../../com/fasterxml/jackson/annotation/OptBoolean.html#fromBoolean(java.lang.Boolean)">fromBoolean</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Boolean.html?is-external=true" title="class or interface in java.lang">Boolean</a> b)</code> </td> 190</tr> 191<tr class="altColor"> 192<td class="colFirst"><code>static <a href="../../../../com/fasterxml/jackson/annotation/OptBoolean.html" title="enum in com.fasterxml.jackson.annotation">OptBoolean</a></code></td> 193<td class="colLast"><code><strong><a href="../../../../com/fasterxml/jackson/annotation/OptBoolean.html#valueOf(java.lang.String)">valueOf</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</code> 194<div class="block">Returns the enum constant of this type with the specified name.</div> 195</td> 196</tr> 197<tr class="rowColor"> 198<td class="colFirst"><code>static <a href="../../../../com/fasterxml/jackson/annotation/OptBoolean.html" title="enum in com.fasterxml.jackson.annotation">OptBoolean</a>[]</code></td> 199<td class="colLast"><code><strong><a href="../../../../com/fasterxml/jackson/annotation/OptBoolean.html#values()">values</a></strong>()</code> 200<div class="block">Returns an array containing the constants of this enum type, in 201the order they are declared.</div> 202</td> 203</tr> 204</table> 205<ul class="blockList"> 206<li class="blockList"><a name="methods_inherited_from_class_java.lang.Enum"> 207<!-- --> 208</a> 209<h3>Methods inherited from class java.lang.<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</a></h3> 210<code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Enum.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Enum.html?is-external=true#compareTo(E)" title="class or interface in java.lang">compareTo</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Enum.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Enum.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Enum.html?is-external=true#getDeclaringClass()" title="class or interface in java.lang">getDeclaringClass</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Enum.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Enum.html?is-external=true#name()" title="class or interface in java.lang">name</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Enum.html?is-external=true#ordinal()" title="class or interface in java.lang">ordinal</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Enum.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Enum.html?is-external=true#valueOf(java.lang.Class,%20java.lang.String)" title="class or interface in java.lang">valueOf</a></code></li> 211</ul> 212<ul class="blockList"> 213<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object"> 214<!-- --> 215</a> 216<h3>Methods inherited from class java.lang.<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> 217<code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long,%20int)" title="class or interface in java.lang">wait</a></code></li> 218</ul> 219</li> 220</ul> 221</li> 222</ul> 223</div> 224<div class="details"> 225<ul class="blockList"> 226<li class="blockList"> 227<!-- ============ ENUM CONSTANT DETAIL =========== --> 228<ul class="blockList"> 229<li class="blockList"><a name="enum_constant_detail"> 230<!-- --> 231</a> 232<h3>Enum Constant Detail</h3> 233<a name="TRUE"> 234<!-- --> 235</a> 236<ul class="blockList"> 237<li class="blockList"> 238<h4>TRUE</h4> 239<pre>public static final <a href="../../../../com/fasterxml/jackson/annotation/OptBoolean.html" title="enum in com.fasterxml.jackson.annotation">OptBoolean</a> TRUE</pre> 240<div class="block">Value that indicates that the annotation property is explicitly defined to 241 be enabled, or true.</div> 242</li> 243</ul> 244<a name="FALSE"> 245<!-- --> 246</a> 247<ul class="blockList"> 248<li class="blockList"> 249<h4>FALSE</h4> 250<pre>public static final <a href="../../../../com/fasterxml/jackson/annotation/OptBoolean.html" title="enum in com.fasterxml.jackson.annotation">OptBoolean</a> FALSE</pre> 251<div class="block">Value that indicates that the annotation property is explicitly defined to 252 be disabled, or false.</div> 253</li> 254</ul> 255<a name="DEFAULT"> 256<!-- --> 257</a> 258<ul class="blockListLast"> 259<li class="blockList"> 260<h4>DEFAULT</h4> 261<pre>public static final <a href="../../../../com/fasterxml/jackson/annotation/OptBoolean.html" title="enum in com.fasterxml.jackson.annotation">OptBoolean</a> DEFAULT</pre> 262<div class="block">Value that indicates that the annotation property does NOT have an explicit 263 definition of enabled/disabled (or true/false); instead, a higher-level 264 configuration value is used; or lacking higher-level global setting, 265 default.</div> 266</li> 267</ul> 268</li> 269</ul> 270<!-- ============ METHOD DETAIL ========== --> 271<ul class="blockList"> 272<li class="blockList"><a name="method_detail"> 273<!-- --> 274</a> 275<h3>Method Detail</h3> 276<a name="values()"> 277<!-- --> 278</a> 279<ul class="blockList"> 280<li class="blockList"> 281<h4>values</h4> 282<pre>public static <a href="../../../../com/fasterxml/jackson/annotation/OptBoolean.html" title="enum in com.fasterxml.jackson.annotation">OptBoolean</a>[] values()</pre> 283<div class="block">Returns an array containing the constants of this enum type, in 284the order they are declared. This method may be used to iterate 285over the constants as follows: 286<pre> 287for (OptBoolean c : OptBoolean.values()) 288 System.out.println(c); 289</pre></div> 290<dl><dt><span class="strong">Returns:</span></dt><dd>an array containing the constants of this enum type, in the order they are declared</dd></dl> 291</li> 292</ul> 293<a name="valueOf(java.lang.String)"> 294<!-- --> 295</a> 296<ul class="blockList"> 297<li class="blockList"> 298<h4>valueOf</h4> 299<pre>public static <a href="../../../../com/fasterxml/jackson/annotation/OptBoolean.html" title="enum in com.fasterxml.jackson.annotation">OptBoolean</a> valueOf(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</pre> 300<div class="block">Returns the enum constant of this type with the specified name. 301The string must match <i>exactly</i> an identifier used to declare an 302enum constant in this type. (Extraneous whitespace characters are 303not permitted.)</div> 304<dl><dt><span class="strong">Parameters:</span></dt><dd><code>name</code> - the name of the enum constant to be returned.</dd> 305<dt><span class="strong">Returns:</span></dt><dd>the enum constant with the specified name</dd> 306<dt><span class="strong">Throws:</span></dt> 307<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if this enum type has no constant with the specified name</dd> 308<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the argument is null</dd></dl> 309</li> 310</ul> 311<a name="asBoolean()"> 312<!-- --> 313</a> 314<ul class="blockList"> 315<li class="blockList"> 316<h4>asBoolean</h4> 317<pre>public <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Boolean.html?is-external=true" title="class or interface in java.lang">Boolean</a> asBoolean()</pre> 318</li> 319</ul> 320<a name="asPrimitive()"> 321<!-- --> 322</a> 323<ul class="blockList"> 324<li class="blockList"> 325<h4>asPrimitive</h4> 326<pre>public boolean asPrimitive()</pre> 327</li> 328</ul> 329<a name="fromBoolean(java.lang.Boolean)"> 330<!-- --> 331</a> 332<ul class="blockList"> 333<li class="blockList"> 334<h4>fromBoolean</h4> 335<pre>public static <a href="../../../../com/fasterxml/jackson/annotation/OptBoolean.html" title="enum in com.fasterxml.jackson.annotation">OptBoolean</a> fromBoolean(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Boolean.html?is-external=true" title="class or interface in java.lang">Boolean</a> b)</pre> 336</li> 337</ul> 338<a name="equals(java.lang.Boolean, java.lang.Boolean)"> 339<!-- --> 340</a> 341<ul class="blockListLast"> 342<li class="blockList"> 343<h4>equals</h4> 344<pre>public static boolean equals(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Boolean.html?is-external=true" title="class or interface in java.lang">Boolean</a> b1, 345 <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Boolean.html?is-external=true" title="class or interface in java.lang">Boolean</a> b2)</pre> 346</li> 347</ul> 348</li> 349</ul> 350</li> 351</ul> 352</div> 353</div> 354<!-- ========= END OF CLASS DATA ========= --> 355<!-- ======= START OF BOTTOM NAVBAR ====== --> 356<div class="bottomNav"><a name="navbar_bottom"> 357<!-- --> 358</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> 359<!-- --> 360</a> 361<ul class="navList" title="Navigation"> 362<li><a href="../../../../com/fasterxml/jackson/annotation/package-summary.html">Package</a></li> 363<li class="navBarCell1Rev">Class</li> 364<li><a href="class-use/OptBoolean.html">Use</a></li> 365<li><a href="package-tree.html">Tree</a></li> 366<li><a href="../../../../deprecated-list.html">Deprecated</a></li> 367<li><a href="../../../../index-all.html">Index</a></li> 368<li><a href="../../../../help-doc.html">Help</a></li> 369</ul> 370</div> 371<div class="subNav"> 372<ul class="navList"> 373<li><a href="../../../../com/fasterxml/jackson/annotation/ObjectIdResolver.html" title="interface in com.fasterxml.jackson.annotation"><span class="strong">Prev Class</span></a></li> 374<li><a href="../../../../com/fasterxml/jackson/annotation/PropertyAccessor.html" title="enum in com.fasterxml.jackson.annotation"><span class="strong">Next Class</span></a></li> 375</ul> 376<ul class="navList"> 377<li><a href="../../../../index.html?com/fasterxml/jackson/annotation/OptBoolean.html" target="_top">Frames</a></li> 378<li><a href="OptBoolean.html" target="_top">No Frames</a></li> 379</ul> 380<ul class="navList" id="allclasses_navbar_bottom"> 381<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> 382</ul> 383<div> 384<script type="text/javascript"><!-- 385 allClassesLink = document.getElementById("allclasses_navbar_bottom"); 386 if(window==top) { 387 allClassesLink.style.display = "block"; 388 } 389 else { 390 allClassesLink.style.display = "none"; 391 } 392 //--> 393</script> 394</div> 395<div> 396<ul class="subNavList"> 397<li>Summary: </li> 398<li>Nested | </li> 399<li><a href="#enum_constant_summary">Enum Constants</a> | </li> 400<li>Field | </li> 401<li><a href="#method_summary">Method</a></li> 402</ul> 403<ul class="subNavList"> 404<li>Detail: </li> 405<li><a href="#enum_constant_detail">Enum Constants</a> | </li> 406<li>Field | </li> 407<li><a href="#method_detail">Method</a></li> 408</ul> 409</div> 410<a name="skip-navbar_bottom"> 411<!-- --> 412</a></div> 413<!-- ======== END OF BOTTOM NAVBAR ======= --> 414<p class="legalCopy"><small>Copyright © 2008–2018 <a href="http://fasterxml.com/">FasterXML</a>. All rights reserved.</small></p> 415</body> 416</html> 417