BooleanModel (FreeMarker 2.3.35 API)
Description: declaration: package: freemarker.ext.beans, class: BooleanModel

Package freemarker.ext.beans

# Class BooleanModel

java.lang.Object
freemarker.ext.beans.BeanModel
freemarker.ext.beans.BooleanModel

All Implemented Interfaces:
  `WrapperTemplateModel`, `AdapterTemplateModel`, `TemplateBooleanModel`, `TemplateHashModel`, `TemplateHashModelEx`, `TemplateModel`, `TemplateModelWithAPISupport`

public class BooleanModel extends BeanModel implements TemplateBooleanModel

A class that will wrap instances of `Boolean` into a `TemplateBooleanModel`.

- ## Field Summary

  ### Fields inherited from class freemarker.ext.beans.BeanModel

  `object, wrapper`

  ### Fields inherited from interface freemarker.template.TemplateBooleanModel

  `FALSE, TRUE`

  ### Fields inherited from interface freemarker.template.TemplateModel

  `NOTHING`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BooleanModel​(Boolean bool, BeansWrapper wrapper)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `getAsBoolean()`

  ### Methods inherited from class freemarker.ext.beans.BeanModel

  `get, get, getAdaptedObject, getAPI, getBeforeMethodCall, getWrappedObject, hasPlainGetMethod, invokeGenericGet, isEmpty, keys, keySet, size, toString, unwrap, values, wrap`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### BooleanModel

    public BooleanModel​(Boolean bool, BeansWrapper wrapper)

- ## Method Details

  - ### getAsBoolean

    public boolean getAsBoolean()
    Specified by:
      `getAsBoolean` in interface `TemplateBooleanModel`
    Returns:
      whether to interpret this object as true or false in a boolean context