Interface: Integer
Stay organized with collections
Save and categorize content based on your preferences.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2019-12-13 UTC.
[null,null,["Last updated 2019-12-13 UTC."],[],[],null,["# Interface: Integer\n\n[rules](/docs/reference/rules/rules).Integer\n============================================\n\ninterface static\n\nPrimitive type representing a signed 64-bit integer value.\n\nIntegers can be compared using the `==`, `!=`,\n`\u003e`, `\u003c`, `\u003e=` and\n`\u003c=` operators.\n\nIntegers support the arithmetic operators `+`, `-`,\n`/`, `*`, and `%`.\n\nIntegers can be negated using the `-` prefix.\n\nInteger values will be coerced to type [rules.Float](/docs/reference/rules/rules.Float) when used in\ncomparison or arithmetic operations with a float value.\n\nString and float values can be converted to integers using the\n`int()` function: \n\n```text\nint(\"2\") == 2\nint(2.0) == 2\n```"]]