Wraps a value with metadata and type-safe getters.

Index

Methods

asBoolean

  • asBoolean():boolean
  • Gets the value as a boolean.

    The following values (case insensitive) are interpreted as true:"1", "true", "t", "yes", "y", "on". Other values are interpreted as false.

    Returnsboolean

asNumber

  • asNumber():number
  • Gets the value as a number. Comparable to callingNumber(value) || 0.

    Returnsnumber

asString

  • asString():string
  • Gets the value as a string.

    Returnsstring

getSource

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2022-07-27 UTC.