Unresolved directive in ../Versions.asciidoc - include::{asciidoc-dir}/../../shared/versions/stack/{source_branch}.asciidoc[]
Unresolved directive in ../Versions.asciidoc - include::{asciidoc-dir}/../../shared/attributes.asciidoc[]
Getting Started with Painless
Painless is a simple, secure scripting language designed specifically for use with Elasticsearch. It is the default scripting language for Elasticsearch and can safely be used for inline and stored scripts. For a detailed description of the Painless syntax and language features, see the {painless}/painless-lang-spec.html[Painless Language Specification].
You can use Painless anywhere scripts can be used in Elasticsearch. Painless provides:
-
Fast performance: Painless scripts run several times faster than the alternatives.
-
Safety: Fine-grained whitelist with method call/field granularity. See the {painless}/painless-api-reference.html[Painless API Reference] for a complete list of available classes and methods.
-
Optional typing: Variables and parameters can use explicit types or the dynamic
def
type. -
Syntax: Extends Java’s syntax to provide Groovy-style scripting language features that make scripts easier to write.
-
Optimizations: Designed specifically for Elasticsearch scripting.
Painless Examples
To illustrate how Painless works, let’s load some hockey stats into an Elasticsearch index:
PUT hockey/player/_bulk?refresh
{"index":{"_id":1}}
{"first":"johnny","last":"gaudreau","goals":[9,27,1],"assists":[17,46,0],"gp":[26,82,1],"born":"1993/08/13"}
{"index":{"_id":2}}
{"first":"sean","last":"monohan","goals":[7,54,26],"assists":[11,26,13],"gp":[26,82,82],"born":"1994/10/12"}
{"index":{"_id":3}}
{"first":"jiri","last":"hudler","goals":[5,34,36],"assists":[11,62,42],"gp":[24,80,79],"born":"1984/01/04"}
{"index":{"_id":4}}
{"first":"micheal","last":"frolik","goals":[4,6,15],"assists":[8,23,15],"gp":[26,82,82],"born":"1988/02/17"}
{"index":{"_id":5}}
{"first":"sam","last":"bennett","goals":[5,0,0],"assists":[8,1,0],"gp":[26,1,0],"born":"1996/06/20"}
{"index":{"_id":6}}
{"first":"dennis","last":"wideman","goals":[0,26,15],"assists":[11,30,24],"gp":[26,81,82],"born":"1983/03/20"}
{"index":{"_id":7}}
{"first":"david","last":"jones","goals":[7,19,5],"assists":[3,17,4],"gp":[26,45,34],"born":"1984/08/10"}
{"index":{"_id":8}}
{"first":"tj","last":"brodie","goals":[2,14,7],"assists":[8,42,30],"gp":[26,82,82],"born":"1990/06/07"}
{"index":{"_id":39}}
{"first":"mark","last":"giordano","goals":[6,30,15],"assists":[3,30,24],"gp":[26,60,63],"born":"1983/10/03"}
{"index":{"_id":10}}
{"first":"mikael","last":"backlund","goals":[3,15,13],"assists":[6,24,18],"gp":[26,82,82],"born":"1989/03/17"}
{"index":{"_id":11}}
{"first":"joe","last":"colborne","goals":[3,18,13],"assists":[6,20,24],"gp":[26,67,82],"born":"1990/01/30"}
Accessing Doc Values from Painless
Document values can be accessed from a Map
named doc
.
For example, the following script calculates a player’s total goals. This example uses a strongly typed int
and a for
loop.
GET hockey/_search
{
"query": {
"function_score": {
"script_score": {
"script": {
"lang": "painless",
"source": """
int total = 0;
for (int i = 0; i < doc['goals'].length; ++i) {
total += doc['goals'][i];
}
return total;
"""
}
}
}
}
}
Alternatively, you could do the same thing using a script field instead of a function score:
GET hockey/_search
{
"query": {
"match_all": {}
},
"script_fields": {
"total_goals": {
"script": {
"lang": "painless",
"source": """
int total = 0;
for (int i = 0; i < doc['goals'].length; ++i) {
total += doc['goals'][i];
}
return total;
"""
}
}
}
}
The following example uses a Painless script to sort the players by their combined first and last names. The names are accessed using
doc['first'].value
and doc['last'].value
.
GET hockey/_search
{
"query": {
"match_all": {}
},
"sort": {
"_script": {
"type": "string",
"order": "asc",
"script": {
"lang": "painless",
"source": "doc['first.keyword'].value + ' ' + doc['last.keyword'].value"
}
}
}
}
Missing values
If you request the value from a field field
that isn’t in
the document, doc['field'].value
for this document returns:
-
0
if afield
has a numeric datatype (long, double etc.) -
false
is afield
has a boolean datatype -
epoch date if a
field
has a date datatype -
null
if afield
has a string datatype -
null
if afield
has a geo datatype -
""
if afield
has a binary datatype
Important
|
Starting in 7.0, doc['field'].value throws an exception if
the field is missing in a document. To enable this behavior now,
set a {ref}/jvm-options.html[jvm.option ]
-Des.scripting.exception_for_missing_value=true on a node. If you do not
enable this behavior, a deprecation warning may be logged when painless
processes a missing value.
|
To check if a document is missing a value, you can call
doc['field'].size() == 0
.
Updating Fields with Painless
You can also easily update fields. You access the original source for a field as ctx._source.<field-name>
.
First, let’s look at the source data for a player by submitting the following request:
GET hockey/_search
{
"query": {
"term": {
"_id": 1
}
}
}
To change player 1’s last name to hockey
, simply set ctx._source.last
to the new value:
POST hockey/player/1/_update
{
"script": {
"lang": "painless",
"source": "ctx._source.last = params.last",
"params": {
"last": "hockey"
}
}
}
You can also add fields to a document. For example, this script adds a new field that contains the player’s nickname, hockey.
POST hockey/player/1/_update
{
"script": {
"lang": "painless",
"source": """
ctx._source.last = params.last;
ctx._source.nick = params.nick
""",
"params": {
"last": "gaudreau",
"nick": "hockey"
}
}
}
Dates
Date fields are exposed as
ReadableDateTime
, so they support methods like getYear
, getDayOfWeek
or e.g. getting milliseconds since epoch with getMillis
. To use these
in a script, leave out the get
prefix and continue with lowercasing the
rest of the method name. For example, the following returns every hockey
player’s birth year:
GET hockey/_search
{
"script_fields": {
"birth_year": {
"script": {
"source": "doc.born.value.year"
}
}
}
}
Regular expressions
Note
|
Regexes are disabled by default because they circumvent Painless’s
protection against long running and memory hungry scripts. To make matters
worse even innocuous looking regexes can have staggering performance and stack
depth behavior. They remain an amazing powerful tool but are too scary to enable
by default. To enable them yourself set script.painless.regex.enabled: true in
elasticsearch.yml . We’d like very much to have a safe alternative
implementation that can be enabled by default so check this space for later
developments!
|
Painless’s native support for regular expressions has syntax constructs:
-
/pattern/
: Pattern literals create patterns. This is the only way to create a pattern in painless. The pattern inside the /'s are just Java regular expressions. See Pattern flags for more. -
=~
: The find operator return aboolean
,true
if a subsequence of the text matches,false
otherwise. -
==~
: The match operator returns aboolean
,true
if the text matches,false
if it doesn’t.
Using the find operator (=~
) you can update all hockey players with "b" in
their last name:
POST hockey/player/_update_by_query
{
"script": {
"lang": "painless",
"source": """
if (ctx._source.last =~ /b/) {
ctx._source.last += "matched";
} else {
ctx.op = "noop";
}
"""
}
}
Using the match operator (==~
) you can update all the hockey players whose
names start with a consonant and end with a vowel:
POST hockey/player/_update_by_query
{
"script": {
"lang": "painless",
"source": """
if (ctx._source.last ==~ /[^aeiou].*[aeiou]/) {
ctx._source.last += "matched";
} else {
ctx.op = "noop";
}
"""
}
}
You can use the Pattern.matcher
directly to get a Matcher
instance and
remove all of the vowels in all of their last names:
POST hockey/player/_update_by_query
{
"script": {
"lang": "painless",
"source": "ctx._source.last = /[aeiou]/.matcher(ctx._source.last).replaceAll('')"
}
}
Matcher.replaceAll
is just a call to Java’s Matcher’s
replaceAll
method so it supports `$1
and \1
for replacements:
POST hockey/player/_update_by_query
{
"script": {
"lang": "painless",
"source": "ctx._source.last = /n([aeiou])/.matcher(ctx._source.last).replaceAll('$1')"
}
}
If you need more control over replacements you can call replaceAll
on a
CharSequence
with a Function<Matcher, String>
that builds the replacement.
This does not support $1
or \1
to access replacements because you already
have a reference to the matcher and can get them with m.group(1)
.
Important
|
Calling Matcher.find inside of the function that builds the
replacement is rude and will likely break the replacement process.
|
This will make all of the vowels in the hockey player’s last names upper case:
POST hockey/player/_update_by_query
{
"script": {
"lang": "painless",
"source": """
ctx._source.last = ctx._source.last.replaceAll(/[aeiou]/, m ->
m.group().toUpperCase(Locale.ROOT))
"""
}
}
Or you can use the CharSequence.replaceFirst
to make the first vowel in their
last names upper case:
POST hockey/player/_update_by_query
{
"script": {
"lang": "painless",
"source": """
ctx._source.last = ctx._source.last.replaceFirst(/[aeiou]/, m ->
m.group().toUpperCase(Locale.ROOT))
"""
}
}
Note: all of the _update_by_query
examples above could really do with a
query
to limit the data that they pull back. While you could use a
{ref}/query-dsl-script-query.html[script query] it wouldn’t be as efficient
as using any other query because script queries aren’t able to use the inverted
index to limit the documents that they have to check.
How painless dispatches functions
Painless uses receiver, name, and arity
for method dispatch. For example, s.foo(a, b)
is resolved by first getting
the class of s
and then looking up the method foo
with two parameters. This
is different from Groovy which uses the
runtime types of the
parameters and Java which uses the compile time types of the parameters.
The consequence of this that Painless doesn’t support overloaded methods like
Java, leading to some trouble when it whitelists classes from the Java
standard library. For example, in Java and Groovy, Matcher
has two methods:
group(int)
and group(String)
. Painless can’t whitelist both of these methods
because they have the same name and the same number of parameters. So instead it
has group(int)
and namedGroup(String)
.
We have a few justifications for this different way of dispatching methods:
-
It makes operating on
def
types simpler and, presumably, faster. Using receiver, name, and arity means that when Painless sees a call on adef
object it can dispatch the appropriate method without having to do expensive comparisons of the types of the parameters. The same is true for invocations withdef
typed parameters. -
It keeps things consistent. It would be genuinely weird for Painless to behave like Groovy if any
def
typed parameters were involved and Java otherwise. It’d be slow for it to behave like Groovy all the time. -
It keeps Painless maintainable. Adding the Java or Groovy like method dispatch feels like it’d add a ton of complexity which’d make maintenance and other improvements much more difficult.
Painless Debugging
Debug.Explain
Painless doesn’t have a
REPL
and while it’d be nice for it to have one day, it wouldn’t tell you the
whole story around debugging painless scripts embedded in Elasticsearch because
the data that the scripts have access to or "context" is so important. For now
the best way to debug embedded scripts is by throwing exceptions at choice
places. While you can throw your own exceptions
(throw new Exception('whatever')
), Painless’s sandbox prevents you from
accessing useful information like the type of an object. So Painless has a
utility method, Debug.explain
which throws the exception for you. For
example, you can use {ref}/search-explain.html[_explain
] to explore the
context available to a {ref}/query-dsl-script-query.html[script query].
PUT /hockey/player/1?refresh
{"first":"johnny","last":"gaudreau","goals":[9,27,1],"assists":[17,46,0],"gp":[26,82,1]}
POST /hockey/player/1/_explain
{
"query": {
"script": {
"script": "Debug.explain(doc.goals)"
}
}
}
Which shows that the class of doc.first
is
org.elasticsearch.index.fielddata.ScriptDocValues.Longs
by responding with:
{
"error": {
"type": "script_exception",
"to_string": "[1, 9, 27]",
"painless_class": "org.elasticsearch.index.fielddata.ScriptDocValues.Longs",
"java_class": "org.elasticsearch.index.fielddata.ScriptDocValues$Longs",
...
},
"status": 500
}
You can use the same trick to see that _source
is a LinkedHashMap
in the _update
API:
POST /hockey/player/1/_update
{
"script": "Debug.explain(ctx._source)"
}
The response looks like:
{
"error" : {
"root_cause": ...,
"type": "illegal_argument_exception",
"reason": "failed to execute script",
"caused_by": {
"type": "script_exception",
"to_string": "{gp=[26, 82, 1], last=gaudreau, assists=[17, 46, 0], first=johnny, goals=[9, 27, 1]}",
"painless_class": "java.util.LinkedHashMap",
"java_class": "java.util.LinkedHashMap",
...
}
},
"status": 400
}
Once you have a class you can go to Painless API Reference to see a list of available methods.
Painless execute API
experimental[The painless execute api is new and the request / response format may change in a breaking way in the future]
The Painless execute API allows an arbitrary script to be executed and a result to be returned.
Name | Required | Default | Description |
---|---|---|---|
|
yes |
- |
The script to execute |
|
no |
|
The context the script should be executed in. |
|
no |
- |
Additional parameters to the context. |
Contexts
Contexts control how scripts are executed, what variables are available at runtime and what the return type is.
Painless test context
The painless_test
context executes scripts as is and do not add any special parameters.
The only variable that is available is params
, which can be used to access user defined values.
The result of the script is always converted to a string.
If no context is specified then this context is used by default.
Example
Request:
POST /_scripts/painless/_execute
{
"script": {
"source": "params.count / params.total",
"params": {
"count": 100.0,
"total": 1000.0
}
}
}
Response:
{
"result": "0.1"
}
Filter context
The filter
context executes scripts as if they were executed inside a script
query.
For testing purposes a document must be provided that will be indexed temporarily in-memory and
is accessible to the script being tested. Because of this the _source, stored fields and doc values
are available in the script being tested.
The following parameters may be specified in context_setup
for a filter context:
- document
-
Contains the document that will be temporarily indexed in-memory and is accessible from the script.
- index
-
The name of an index containing a mapping that is compatible with the document being indexed.
Example
PUT /my-index
{
"mappings": {
"_doc": {
"properties": {
"field": {
"type": "keyword"
}
}
}
}
}
POST /_scripts/painless/_execute
{
"script": {
"source": "doc['field'].value.length() <= params.max_length",
"params": {
"max_length": 4
}
},
"context": "filter",
"context_setup": {
"index": "my-index",
"document": {
"field": "four"
}
}
}
Response:
{
"result": true
}
Score context
The score
context executes scripts as if they were executed inside a script_score
function in
function_score
query.
The following parameters may be specified in context_setup
for a score context:
- document
-
Contains the document that will be temporarily indexed in-memory and is accessible from the script.
- index
-
The name of an index containing a mapping that is compatible with the document being indexed.
- query
-
If
_score
is used in the script then a query can specified that will be used to compute a score.
Example
PUT /my-index
{
"mappings": {
"_doc": {
"properties": {
"field": {
"type": "keyword"
},
"rank": {
"type": "long"
}
}
}
}
}
POST /_scripts/painless/_execute
{
"script": {
"source": "doc['rank'].value / params.max_rank",
"params": {
"max_rank": 5.0
}
},
"context": "score",
"context_setup": {
"index": "my-index",
"document": {
"rank": 4
}
}
}
Response:
{
"result": 0.8
}
Painless Language Specification
Painless is a scripting language designed for security and performance. Painless syntax is similar to Java syntax along with some additional features such as dynamic typing, Map and List accessor shortcuts, and array initializers. As a direct comparison to Java, there are some important differences, especially related to the casting model. For more detailed conceptual information about the basic constructs that Painless and Java share, refer to the corresponding topics in the Java Language Specification.
Painless scripts are parsed and compiled using the ANTLR4 and ASM libraries. Scripts are compiled directly into Java Virtual Machine (JVM) byte code and executed against a standard JVM. This specification uses ANTLR4 grammar notation to describe the allowed syntax. However, the actual Painless grammar is more compact than what is shown here.
Comments
Use a comment to annotate or explain code within a script. Use the //
token
anywhere on a line to specify a single-line comment. All characters from the
//
token to the end of the line are ignored. Use an opening /
token and a
closing /
token to specify a multi-line comment. Multi-line comments can
start anywhere on a line, and all characters in between the /
token and /
token are ignored. A comment is included anywhere within a script.
Grammar
SINGLE_LINE_COMMENT: '//' .*? [\n\r];
MULTI_LINE_COMMENT: '/*' .*? '*/';
Examples
-
Single-line comments.
// single-line comment int value; // single-line comment
-
Multi-line comments.
/* multi- line comment */ int value; /* multi- line comment */ value = 0; int value; /* multi-line comment */ /* multi-line comment */ int value; int value; /* multi-line comment */ value = 0; int value; /* multi-line comment */ value = 0;
Keywords
Keywords are reserved tokens for built-in language features.
Errors
-
If a keyword is used as an identifier.
Keywords
if |
else |
while |
do |
for |
in |
continue |
break |
return |
new |
try |
catch |
throw |
this |
instanceof |
Literals
Use a literal to specify a value directly in an operation.
Integers
Use an integer literal to specify an integer type value in decimal, octal, or
hex notation of a primitive type int
, long
, float
,
or double
. Use the following single letter designations to specify the
primitive type: l
or L
for long
, f
or F
for float
, and d
or D
for double
. If not specified, the type defaults to int
. Use 0
as a prefix
to specify an integer literal as octal, and use 0x
or 0X
as a prefix to
specify an integer literal as hex.
Grammar
INTEGER: '-'? ( '0' | [1-9] [0-9]* ) [lLfFdD]?;
OCTAL: '-'? '0' [0-7]+ [lL]?;
HEX: '-'? '0' [xX] [0-9a-fA-F]+ [lL]?;
Examples
-
Integer literals.
0 (1) 0D (2) 1234L (3) -90f (4) -022 (5) 0xF2A (6)
-
int 0
-
double 0.0
-
long 1234
-
float -90.0
-
int -18
in octal -
int 3882
in hex
-
Floats
Use a floating point literal to specify a floating point type value of a
primitive type float
or double
. Use the following
single letter designations to specify the primitive type: f
or F
for float
and d
or D
for double
. If not specified, the type defaults to double
.
Grammar
DECIMAL: '-'? ( '0' | [1-9] [0-9]* ) (DOT [0-9]+)? EXPONENT? [fFdD]?;
EXPONENT: ( [eE] [+\-]? [0-9]+ );
Examples
-
Floating point literals.
0.0 (1) 1E6 (2) 0.977777 (3) -126.34 (4) 89.9F (5)
-
double 0.0
-
double 1000000.0
in exponent notation -
double 0.977777
-
double -126.34
-
float 89.9
-
Strings
Use a string literal to specify a String
type value with
either single-quotes or double-quotes. Use a \"
token to include a
double-quote as part of a double-quoted string literal. Use a \'
token to
include a single-quote as part of a single-quoted string literal. Use a \\
token to include a backslash as part of any string literal.
Grammar
STRING: ( '"' ( '\\"' | '\\\\' | ~[\\"] )*? '"' )
| ( '\'' ( '\\\'' | '\\\\' | ~[\\'] )*? '\'' );
Examples
-
String literals using single-quotes.
'single-quoted string literal' '\'single-quoted with escaped single-quotes\' and backslash \\' 'single-quoted with non-escaped "double-quotes"'
-
String literals using double-quotes.
"double-quoted string literal" "\"double-quoted with escaped double-quotes\" and backslash: \\" "double-quoted with non-escaped 'single-quotes'"
Characters
Character literals are not specified directly. Instead, use the
cast operator to convert a String
type value
into a char
type value.
Identifiers
Errors
If a keyword is used as an identifier.
Grammar
ID: [_a-zA-Z] [_a-zA-Z-0-9]*;
Examples
-
Variations of identifiers.
a Z id list list0 MAP25 _map25 Map_25
Variables
A variable loads and stores a value for evaluation during operations.
Declaration
Declare a variable before use with the format of type
followed by identifier. Declare an
array type variable using an opening [
token and a closing ]
token for each dimension directly after the identifier. Specify a
comma-separated list of identifiers following the type to declare multiple
variables in a single statement. Use an
assignment operator combined with a declaration to
immediately assign a value to a variable. A variable not immediately assigned a
value will have a default value assigned implicitly based on the type.
Errors
-
If a variable is used prior to or without declaration.
Grammar
declaration : type ID assignment? (',' ID assignment?)*;
type: ID ('.' ID)* ('[' ']')*;
assignment: '=' expression;
Examples
-
Different variations of variable declaration.
int x; (1) List y; (2) int x, y = 5, z; (3) def d; (4) int i = 10; (5) float[] f; (6) Map[][] m; (7)
-
declare
int x
; store defaultnull
tox
-
declare
List y
; store defaultnull
toy
-
declare
int x
; store defaultint 0
tox
; declareint y
; storeint 5
toy
; declareint z
; store defaultint 0
toz
; -
declare
def d
; store defaultnull
tod
-
declare
int i
; storeint 10
toi
-
declare
float[] f
; store defaultnull
tof
-
declare
Map[][] m
; store defaultnull
tom
-
Assignment
Use the assignment operator '='
to store a value in a variable for use in
subsequent operations. Any operation that produces a value can be assigned to
any variable as long as the types are the same or the
resultant type can be implicitly cast to the variable
type.
Errors
-
If the type of value is unable to match the type of variable.
Grammar
assignment: ID '=' expression
Examples
-
Variable assignment with an integer literal.
int i; (1) i = 10; (2)
-
declare
int i
; store defaultint 0
toi
-
store
int 10
toi
-
-
Declaration combined with immediate assignment.
int i = 10; (1) double j = 2.0; (2)
-
declare
int i
; storeint 10
toi
-
declare
double j
; storedouble 2.0
toj
-
-
Assignment of one variable to another using primitive type values.
int i = 10; (1) int j = i; (2)
-
declare
int i
; storeint 10
toi
-
declare
int j
; load fromi
→int 10
; storeint 10
toj
-
-
Assignment with reference types using the new instance operator.
ArrayList l = new ArrayList(); (1) Map m = new HashMap(); (2)
-
declare
ArrayList l
; allocateArrayList
instance →ArrayList reference
; storeArrayList reference
tol
-
declare
Map m
; allocateHashMap
instance →HashMap reference
; implicit castHashMap reference
toMap reference
→Map reference
; storeMap reference
tom
-
-
Assignment of one variable to another using reference type values.
List l = new ArrayList(); (1) List k = l; (2) List m; (3) m = k; (4)
-
declare
List l
; allocateArrayList
instance →ArrayList reference
; implicit castArrayList reference
toList reference
→List reference
; storeList reference
tol
-
declare
List k
; load froml
→List reference
; storeList reference
tok
; (notel
andk
refer to the same instance known as a shallow-copy) -
declare
List m
; store defaultnull
tom
-
load from
k
→List reference
; storeList reference
tom
; (notel
,k
, andm
refer to the same instance)
-
-
Assignment with array type variables using the new array operator.
int[] ia1; (1) ia1 = new int[2]; (2) ia1[0] = 1; (3) int[] ib1 = ia1; (4) int[][] ic2 = new int[2][5]; (5) ic2[1][3] = 2; (6) ic2[0] = ia1; (7)
-
declare
int[] ia1
; store defaultnull
toia1
-
allocate
1-d int array
instance withlength [2]
→1-d int array reference
; store1-d int array reference
toia1
-
load from
ia1
→1-d int array reference
; storeint 1
toindex [0]
of1-d int array reference
-
declare
int[] ib1
; load fromia1
→1-d int array reference
; store1-d int array reference
toib1
; (noteia1
andib1
refer to the same instance known as a shallow copy) -
declare
int[][] ic2
; allocate2-d int array
instance withlength [2, 5]
→2-d int array reference
; store2-d int array reference
toic2
-
load from
ic2
→2-d int array reference
; storeint 2
toindex [1, 3]
of2-d int array reference
-
load from
ia1
→1-d int array reference
; load fromic2
→2-d int array reference
; store1-d int array reference
toindex [0]
of2-d int array reference
; (noteia1
,ib1
, andindex [0]
ofia2
refer to the same instance)
-
Types
A type is a classification of data used to define the properties of a value. These properties specify what data a value represents and the rules for how a value is evaluated during an operation. Each type belongs to one of the following categories: primitive, reference, or dynamic.
Primitive Types
A primitive type represents basic data built natively into the JVM and is allocated to non-heap memory. Declare a primitive type variable or access a primitive type member field (from a reference type instance), and assign it a primitive type value for evaluation during later operations. The default value for a newly-declared primitive type variable is listed as part of the definitions below. A primitive type value is copied during an assignment or as an argument for a method/function call.
A primitive type has a corresponding reference type (also known as a boxed type). Use the field access operator or method call operator on a primitive type value to force evaluation as its corresponding reference type value.
The following primitive types are available:
byte
|
8-bit, signed, two’s complement integer
|
short
|
16-bit, signed, two’s complement integer
|
char
|
16-bit, unsigned, Unicode character
|
int
|
32-bit, signed, two’s complement integer
|
long
|
64-bit, signed, two’s complement integer
|
float
|
32-bit, signed, single-precision, IEEE 754 floating point number
|
double
|
64-bit, signed, double-precision, IEEE 754 floating point number
|
boolean
|
logical quantity with two possible values of
|
Examples
-
Primitive types used in declaration, declaration and assignment.
int i = 1; (1) double d; (2) boolean b = true; (3)
-
declare
int i
; storeint 1
toi
-
declare
double d
; store defaultdouble 0.0
tod
-
declare
boolean b
; storeboolean true
tob
-
-
Method call on a primitive type using the corresponding reference type.
int i = 1; (1) i.toString(); (2)
-
declare
int i
; storeint 1
toi
-
load from
i
→int 1
; boxint 1
→Integer 1 reference
; calltoString
onInteger 1 reference
→String '1'
-
Reference Types
A reference type is a named construct (object), potentially representing multiple pieces of data (member fields) and logic to manipulate that data (member methods), defined as part of the application programming interface (API) for scripts.
A reference type instance is a single set of data for one reference type object allocated to the heap. Use the new instance operator to allocate a reference type instance. Use a reference type instance to load from, store to, and manipulate complex data.
A reference type value refers to a reference type instance, and multiple reference type values may refer to the same reference type instance. A change to a reference type instance will affect all reference type values referring to that specific instance.
Declare a reference type variable or access a reference
type member field (from a reference type instance), and assign it a reference
type value for evaluation during later operations. The default value for a
newly-declared reference type variable is null
. A reference type value is
shallow-copied during an assignment or as an argument for a method/function
call. Assign null
to a reference type variable to indicate the reference type
value refers to no reference type instance. The JVM will garbage collect a
reference type instance when it is no longer referred to by any reference type
values. Pass null
as an argument to a method/function call to indicate the
argument refers to no reference type instance.
A reference type object defines zero-to-many of each of the following:
- static member field
-
A static member field is a named and typed piece of data. Each reference type object contains one set of data representative of its static member fields. Use the field access operator in correspondence with the reference type object name to access a static member field for loading and storing to a specific reference type object. No reference type instance allocation is necessary to use a static member field.
- non-static member field
-
A non-static member field is a named and typed piece of data. Each reference type instance contains one set of data representative of its reference type object’s non-static member fields. Use the field access operator for loading and storing to a non-static member field of a specific reference type instance. An allocated reference type instance is required to use a non-static member field.
- static member method
-
A static member method is a function called on a reference type object. Use the method call operator in correspondence with the reference type object name to call a static member method. No reference type instance allocation is necessary to use a static member method.
- non-static member method
-
A non-static member method is a function called on a reference type instance. A non-static member method called on a reference type instance can load from and store to non-static member fields of that specific reference type instance. Use the method call operator in correspondence with a specific reference type instance to call a non-static member method. An allocated reference type instance is required to use a non-static member method.
- constructor
-
A constructor is a special type of function used to allocate a reference type instance defined by a specific reference type object. Use the new instance operator to allocate a reference type instance.
A reference type object follows a basic inheritance model. Consider types A and B. Type A is considered to be a parent of B, and B a child of A, if B inherits (is able to access as its own) all of A’s non-static members. Type B is considered a descendant of A if there exists a recursive parent-child relationship from B to A with none to many types in between. In this case, B inherits all of A’s non-static members along with all of the non-static members of the types in between. Type B is also considered to be a type A in both relationships.
Examples
-
Reference types evaluated in several different operations.
List l = new ArrayList(); (1) l.add(1); (2) int i = l.get(0) + 2; (3)
-
declare
List l
; allocateArrayList
instance →ArrayList reference
; implicit castArrayList reference
toList reference
→List reference
; storeList reference
tol
-
load from
l
→List reference
; implicit castint 1
todef
→def
calladd
onList reference
with arguments (def
) -
declare
int i
; load froml
→List reference
; callget
onList reference
with arguments (int 0
) →def
; implicit castdef
toint 1
→int 1
; addint 1
andint 2
→int 3
; storeint 3
toi
-
-
Sharing a reference type instance.
List l0 = new ArrayList(); (1) List l1 = l0; (2) l0.add(1); (3) l1.add(2); (4) int i = l1.get(0) + l0.get(1); (5)
-
declare
List l0
; allocateArrayList
instance →ArrayList reference
; implicit castArrayList reference
toList reference
→List reference
; storeList reference
tol0
-
declare
List l1
; load froml0
→List reference
; storeList reference
tol1
(notel0
andl1
refer to the same instance known as a shallow-copy) -
load from
l0
→List reference
; implicit castint 1
todef
→def
calladd
onList reference
with arguments (def
) -
load from
l1
→List reference
; implicit castint 2
todef
→def
calladd
onList reference
with arguments (def
) -
declare
int i
; load froml0
→List reference
; callget
onList reference
with arguments (int 0
) →def @0
; implicit castdef @0
toint 1
→int 1
; load froml1
→List reference
; callget
onList reference
with arguments (int 1
) →def @1
; implicit castdef @1
toint 2
→int 2
; addint 1
andint 2
→int 3
; storeint 3
toi
;
-
-
Using the static members of a reference type.
int i = Integer.MAX_VALUE; (1) long l = Long.parseLong("123L"); (2)
-
declare
int i
; load fromMAX_VALUE
onInteger
→int 2147483647
; storeint 2147483647
toi
-
declare
long l
; callparseLong
onLong
with arguments (long 123
) →long 123
; storelong 123
tol
-
Dynamic Types
A dynamic type value can represent the value of any primitive type or
reference type using a single type name def
. A def
type value mimics
the behavior of whatever value it represents at run-time and will always
represent the child-most descendant type value of any type value when evaluated
during operations.
Declare a def
type variable or access a def
type
member field (from a reference type instance), and assign it any type of value
for evaluation during later operations. The default value for a newly-declared
def
type variable is null
. A def
type variable or method/function
parameter can change the type it represents during the compilation and
evaluation of a script.
Using the def
type can have a slight impact on performance. Use only primitive
types and reference types directly when performance is critical.
Errors
-
If a
def
type value represents an inappropriate type for evaluation of an operation at run-time.
Examples
-
General uses of the
def
type.def dp = 1; (1) def dr = new ArrayList(); (2) dr = dp; (3)
-
declare
def dp
; implicit castint 1
todef
→def
; storedef
todp
-
declare
def dr
; allocateArrayList
instance →ArrayList reference
; implicit castArrayList reference
todef
→def
; storedef
todr
-
load from
dp
→def
; storedef
todr
; (note the switch in the typedr
represents fromArrayList
toint
)
-
-
A
def
type value representing the child-most descendant of a value.Object l = new ArrayList(); (1) def d = l; (2) d.ensureCapacity(10); (3)
-
declare
Object l
; allocateArrayList
instance →ArrayList reference
; implicit castArrayList reference
toObject reference
→Object reference
; storeObject reference
tol
-
declare
def d
; load froml
→Object reference
; implicit castObject reference
todef
→def
; storedef
tod
; -
load from
d
→def
; implicit castdef
toArrayList reference
→ArrayList reference
; callensureCapacity
onArrayList reference
with arguments (int 10
); (notedef
was implicit cast toArrayList reference
since ArrayList` is the child-most descendant type value that thedef
type value represents)
-
String Type
The String
type is a specialized reference type that does not require
explicit allocation. Use a string literal to directly
evaluate a String
type value. While not required, the
new instance operator can allocate String
type
instances.
Examples
-
General use of the
String
type.String r = "some text"; (1) String s = 'some text'; (2) String t = new String("some text"); (3) String u; (4)
-
declare
String r
; storeString "some text"
tor
-
declare
String s
; storeString 'some text'
tos
-
declare
String t
; allocateString
instance with arguments (String "some text"
) →String "some text"
; storeString "some text"
tot
-
declare
String u
; store defaultnull
tou
-
void Type
The void
type represents the concept of a lack of type. Use the void
type to
indicate a function returns no value.
Examples
-
Use of the
void
type in a function.void addToList(List l, def d) { l.add(d); }
Array Type
An array type is a specialized reference type where an array type instance
contains a series of values allocated to the heap. Each value in an array type
instance is defined as an element. All elements in an array type instance are of
the same type (element type) specified as part of declaration. Each element is
assigned an index within the range [0, length)
where length is the total
number of elements allocated for an array type instance.
Use the new array operator or the
array initialization operator to allocate an
array type instance. Declare an array type variable or
access an array type member field (from a reference type instance), and assign
it an array type value for evaluation during later operations. The default value
for a newly-declared array type variable is null
. An array type value is
shallow-copied during an assignment or as an argument for a method/function
call. Assign null
to an array type variable to indicate the array type value
refers to no array type instance. The JVM will garbage collect an array type
instance when it is no longer referred to by any array type values. Pass null
as an argument to a method/function call to indicate the argument refers to no
array type instance.
Use the array length operator to retrieve the length
of an array type value as an int
type value. Use the
array access operator to load from and store to
an individual element within an array type instance.
When an array type instance is allocated with multiple dimensions using the
range [2, d]
where d >= 2
, each element within each dimension in the range
[1, d-1]
is also an array type. The element type of each dimension, n
, is an
array type with the number of dimensions equal to d-n
. For example, consider
int[][][]
with 3 dimensions. Each element in the 3rd dimension, d-3
, is the
primitive type int
. Each element in the 2nd dimension, d-2
, is the array
type int[]
. And each element in the 1st dimension, d-1
is the array type
int[][]
.
Examples
-
General use of single-dimensional arrays.
int[] x; (1) float[] y = new float[10]; (2) def z = new float[5]; (3) y[9] = 1.0F; (4) z[0] = y[9]; (5)
-
declare
int[] x
; store defaultnull
tox
-
declare
float[] y
; allocate1-d float array
instance withlength [10]
→1-d float array reference
; store1-d float array reference
toy
-
declare
def z
; allocate1-d float array
instance withlength [5]
→1-d float array reference
; implicit cast1-d float array reference
todef
→def
; storedef
toz
-
load from
y
→1-d float array reference
; storefloat 1.0
toindex [9]
of1-d float array reference
-
load from
y
→1-d float array reference @0
; load fromindex [9]
of1-d float array reference @0
→float 1.0
; load fromz
→def
; implicit castdef
to1-d float array reference @1
→1-d float array reference @1
; storefloat 1.0
toindex [0]
of1-d float array reference @1
-
-
General use of a multi-dimensional array.
int[][][] ia3 = new int[2][3][4]; (1) ia3[1][2][3] = 99; (2) int i = ia3[1][2][3]; (3)
-
declare
int[][][] ia
; allocate3-d int array
instance with length[2, 3, 4]
→3-d int array reference
; store3-d int array reference
toia3
-
load from
ia3
→3-d int array reference
; storeint 99
toindex [1, 2, 3]
of3-d int array reference
-
declare
int i
; load fromia3
→3-d int array reference
; load fromindex [1, 2, 3]
of3-d int array reference
→int 99
; storeint 99
toi
-
Casting
A cast converts the value of an original type to the equivalent value of a
target type. An implicit cast infers the target type and automatically occurs
during certain operations. An explicit cast specifies
the target type and forcefully occurs as its own operation. Use the cast
operator '()'
to specify an explicit cast.
Refer to the cast table for a quick reference on all allowed casts.
Errors
-
If during a cast there exists no equivalent value for the target type.
-
If an implicit cast is given, but an explicit cast is required.
Grammar
cast: '(' TYPE ')' expression
Examples
-
Valid casts.
int i = (int)5L; (1) Map m = new HashMap(); (2) HashMap hm = (HashMap)m; (3)
-
declare
int i
; explicit castlong 5
toint 5
→int 5
; storeint 5
toi
-
declare
Map m
; allocateHashMap
instance →HashMap reference
; implicit castHashMap reference
toMap reference
→Map reference
; storeMap reference
tom
-
declare
HashMap hm
; load fromm
→Map reference
; explicit castMap reference
toHashMap reference
→HashMap reference
; storeHashMap reference
tohm
-
Numeric Type Casting
A numeric type cast converts the value of an original numeric type to the equivalent value of a target numeric type. A cast between two numeric type values results in data loss when the value of the original numeric type is larger than the target numeric type can accommodate. A cast between an integer type value and a floating point type value can result in precision loss.
The allowed casts for values of each numeric type are shown as a row in the following table:
byte |
short |
char |
int |
long |
float |
double |
|
byte |
implicit |
implicit |
implicit |
implicit |
implicit |
implicit |
|
short |
explicit |
explicit |
implicit |
implicit |
implicit |
implicit |
|
char |
explicit |
explicit |
implicit |
implicit |
implicit |
implicit |
|
int |
explicit |
explicit |
explicit |
implicit |
implicit |
implicit |
|
long |
explicit |
explicit |
explicit |
explicit |
implicit |
implicit |
|
float |
explicit |
explicit |
explicit |
explicit |
explicit |
implicit |
|
double |
explicit |
explicit |
explicit |
explicit |
explicit |
explicit |
Examples
-
Valid numeric type casts.
int a = 1; (1) long b = a; (2) short c = (short)b; (3) double e = (double)a; (4)
-
declare
int a
; storeint 1
toa
-
declare
long b
; load froma
→int 1
; implicit castint 1
tolong 1
→long 1
; storelong 1
tob
-
declare
short c
; load fromb
→long 1
; explicit castlong 1
toshort 1
→short 1
; storeshort 1
value toc
-
declare
double e
; load froma
→int 1
; explicit castint 1
todouble 1.0
; storedouble 1.0
toe
; (note the explicit cast is extraneous since an implicit cast is valid)
-
-
Invalid numeric type casts resulting in errors.
int a = 1.0; // error (1) int b = 2; (2) byte c = b; // error (3)
-
declare
int i
; error → cannot implicit castdouble 1.0
toint 1
; (note an explicit cast is valid) -
declare
int b
; storeint 2
tob
-
declare byte
c
; load fromb
→int 2
; error → cannot implicit castint 2
tobyte 2
; (note an explicit cast is valid)
-
Reference Type Casting
A reference type cast converts the value of an original reference type to the equivalent value of a target reference type. An implicit cast between two reference type values is allowed when the original reference type is a descendant of the target type. An explicit cast between two reference type values is allowed when the original type is a descendant of the target type or the target type is a descendant of the original type.
Examples
-
Valid reference type casts.
List x; (1) ArrayList y = new ArrayList(); (2) x = y; (3) y = (ArrayList)x; (4) x = (List)y; (5)
-
declare
List x
; store default valuenull
tox
-
declare
ArrayList y
; allocateArrayList
instance →ArrayList reference
; storeArrayList reference
toy
; -
load from
y
→ArrayList reference
; implicit castArrayList reference
toList reference
→List reference
; storeList reference
tox
; (noteArrayList
is a descendant ofList
) -
load from
x
→List reference
; explicit castList reference
toArrayList reference
→ArrayList reference
; storeArrayList reference
toy
; -
load from
y
→ArrayList reference
; explicit castArrayList reference
toList reference
→List reference
; storeList reference
tox
; (note the explicit cast is extraneous, and an implicit cast is valid)
-
-
Invalid reference type casts resulting in errors.
List x = new ArrayList(); (1) ArrayList y = x; // error (2) Map m = (Map)x; // error (3)
-
declare
List x
; allocateArrayList
instance →ArrayList reference
; implicit castArrayList reference
toList reference
→List reference
; storeList reference
tox
-
declare
ArrayList y
; load fromx
→List reference
; error → cannot implicit castList reference
toArrayList reference
; (note an explicit cast is valid sinceArrayList
is a descendant ofList
) -
declare
ArrayList y
; load fromx
→List reference
; error → cannot explicit castList reference
toMap reference
; (note no cast is valid since neitherList
norMap
is a descendant of the other)
-
Dynamic Type Casting
A dynamic (def
) type cast converts the value of an original
def
type to the equivalent value of any target type or converts the value of
any original type to the equivalent value of a target def
type.
An implicit cast from any original type value to a def
type value is always
allowed. An explicit cast from any original type value to a def
type value is
always allowed but never necessary.
An implicit or explicit cast from an original def
type value to
any target type value is allowed if and only if the cast is normally allowed
based on the current type value the def
type value represents.
Examples
-
Valid dynamic type casts with any original type to a target
def
type.def d0 = 3; (1) d0 = new ArrayList(); (2) Object o = new HashMap(); (3) def d1 = o; (4) int i = d1.size(); (5)
-
declare
def d0
; implicit castint 3
todef
; storeint 3
tod0
-
allocate
ArrayList
instance →ArrayList reference
; implicit castArrayList reference
todef
→def
; storedef
tod0
-
declare
Object o
; allocateHashMap
instance →HashMap reference
; implicit castHashMap reference
toObject reference
→Object reference
; storeObject reference
too
-
declare
def d1
; load fromo
→Object reference
; implicit castObject reference
todef
→def
; storedef
tod1
-
declare
int i
; load fromd1
→def
; implicit castdef
toHashMap reference
→ HashMap reference`; callsize
onHashMap reference
→int 0
; storeint 0
toi
; (notedef
was implicit cast toHashMap reference
sinceHashMap
is the child-most descendant type value that thedef
type value represents)
-
-
Valid dynamic type casts with an original
def
type to any target type.def d = 1.0; (1) int i = (int)d; (2) d = 1; (3) float f = d; (4) d = new ArrayList(); (5) List l = d; (6)
-
declare
def d
; implicit castdouble 1.0
todef
→def
; storedef
tod
-
declare
int i
; load fromd
→def
; implicit castdef
todouble 1.0
→double 1.0
; explicit castdouble 1.0
toint 1
→int 1
; storeint 1
toi
; (note the explicit cast is necessary since adouble
type value is not converted to anint
type value implicitly) -
store
int 1
tod
; (note the switch in the typed
represents fromdouble
toint
) -
declare
float i
; load fromd
→def
; implicit castdef
toint 1
→int 1
; implicit castint 1
tofloat 1.0
→float 1.0
; storefloat 1.0
tof
-
allocate
ArrayList
instance →ArrayList reference
; storeArrayList reference
tod
; (note the switch in the typed
represents fromint
toArrayList
) -
declare
List l
; load fromd
→def
; implicit castdef
toArrayList reference
→ArrayList reference
; implicit castArrayList reference
toList reference
→List reference
; storeList reference
tol
-
-
Invalid dynamic type casts resulting in errors.
def d = 1; (1) short s = d; // error (2) d = new HashMap(); (3) List l = d; // error (4)
-
declare
def d
; implicit castint 1
todef
→def
; storedef
tod
-
declare
short s
; load fromd
→def
; implicit castdef
toint 1
→int 1
; error → cannot implicit castint 1
toshort 1
; (note an explicit cast is valid) -
allocate
HashMap
instance →HashMap reference
; implicit castHashMap reference
todef
→def
; storedef
tod
-
declare
List l
; load fromd
→def
; implicit castdef
toHashMap reference
; error → cannot implicit castHashMap reference
toList reference
; (note no cast is valid since neitherHashMap
norList
is a descendant of the other)
-
String to Character Casting
Use the cast operator to convert a String
type value into a
char
type value.
Errors
-
If the
String
type value isn’t one character in length. -
If the
String
type value isnull
.
Examples
-
Casting string literals into
char
type values.char c = (char)"C"; (1) c = (char)'c'; (2)
-
declare
char c
; explicit castString "C"
tochar C
→char C
; storechar C
toc
-
explicit cast
String 'c'
tochar c
→char c
; storechar c
toc
-
-
Casting a
String
reference into achar
type value.String s = "s"; (1) char c = (char)s; (2)
-
declare
String s
; storeString "s"
tos
; -
declare
char c
load froms
→String "s"
; explicit castString "s"
tochar s
→char s
; storechar s
toc
-
Boxing and Unboxing
Boxing is a special type of cast used to convert a primitive type to its corresponding reference type. Unboxing is the reverse used to convert a reference type to its corresponding primitive type.
Implicit boxing/unboxing occurs during the following operations:
-
Conversions between a
def
type and a primitive type are implicitly boxed/unboxed as necessary, though this is referred to as an implicit cast throughout the documentation. -
Method/function call arguments are implicitly boxed/unboxed as necessary.
-
A primitive type value is implicitly boxed when a reference type method is called on it.
Explicit boxing/unboxing is not allowed. Use the reference type API to explicitly convert a primitive type value to its respective reference type value and vice versa.
Errors
-
If an explicit cast is made to box/unbox a primitive type.
Examples
-
Uses of implicit boxing/unboxing.
List l = new ArrayList(); (1) l.add(1); (2) Integer I = Integer.valueOf(0); (3) int i = l.get(i); (4)
-
declare
List l
; allocateArrayList
instance →ArrayList reference
; storeArrayList reference
tol
; -
load from
l
→List reference
; implicit castint 1
todef
→def
; calladd
onList reference
with arguments (def
); (note internallyint 1
is boxed toInteger 1
to store as adef
type value) -
declare
Integer I
; callvalueOf
onInteger
with arguments of (int 0
) →Integer 0
; storeInteger 0
toI
; -
declare
int i
; load fromI
→Integer 0
; unboxInteger 0
→int 0
; load froml
→List reference
; callget
onList reference
with arguments (int 0
) →def
; implicit castdef
toint 1
→int 1
; storeint 1
toi
; (note internallyint 1
is unboxed fromInteger 1
when loaded from adef
type value)
-
-
Uses of invalid boxing/unboxing resulting in errors.
Integer x = 1; // error (1) Integer y = (Integer)1; // error (2) int a = Integer.valueOf(1); // error (3) int b = (int)Integer.valueOf(1); // error (4)
-
declare
Integer x
; error → cannot implicit boxint 1
toInteger 1
during assignment -
declare
Integer y
; error → cannot explicit boxint 1
toInteger 1
during assignment -
declare
int a
; callvalueOf
onInteger
with arguments of (int 1
) →Integer 1
; error → cannot implicit unboxInteger 1
toint 1
during assignment -
declare
int a
; callvalueOf
onInteger
with arguments of (int 1
) →Integer 1
; error → cannot explicit unboxInteger 1
toint 1
during assignment
-
Promotion
Promotion is when a single value is implicitly cast to a certain type or
multiple values are implicitly cast to the same type as required for evaluation
by certain operations. Each operation that requires promotion has a promotion
table that shows all required implicit casts based on the type(s) of value(s). A
value promoted to a def
type at compile-time is promoted again at run-time
based on the type the def
value represents.
Errors
-
If a specific operation cannot find an allowed promotion type for the type(s) of value(s) given.
Examples
-
Uses of promotion.
double d = 2 + 2.0; (1) def x = 1; (2) float f = x + 2.0F; (3)
-
declare
double d
; promoteint 2
anddouble 2.0 @0
: resultdouble
; implicit castint 2
todouble 2.0 @1
→double 2.0 @1
; adddouble 2.0 @1
anddouble 2.0 @0
→double 4.0
; storedouble 4.0
tod
-
declare
def x
; implicit castint 1
todef
→def
; storedef
tox
; -
declare
float f
; load fromx
→def
; implicit castdef
toint 1
→int 1
; promoteint 1
andfloat 2.0
: resultfloat
; implicit castint 1
tofloat 1.0
→float `1.0
; addfloat 1.0
andfloat 2.0
→float 3.0
; storefloat 3.0
tof
; (note this example illustrates promotion done at run-time as promotion done at compile-time would have resolved to adef
type value)
-
Allowed Casts
The following tables show all allowed casts. Read the tables row by row, where the original type is shown in the first column, and each subsequent column indicates whether a cast to the specified target type is implicit (I), explicit (E), or is not allowed (-).
Primitive/Reference Types
o |
b |
s |
c |
i |
j |
f |
d |
O |
B |
S |
C |
I |
L |
F |
D |
T |
R |
def |
|
boolean ( o ) |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
I |
|
byte ( b ) |
- |
I |
I |
I |
I |
I |
I |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
I |
|
short ( s ) |
- |
E |
E |
I |
I |
I |
I |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
I |
|
char ( c ) |
- |
E |
E |
I |
I |
I |
I |
- |
- |
- |
- |
- |
- |
- |
- |
E |
- |
I |
|
int ( i ) |
- |
E |
E |
E |
I |
I |
I |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
I |
|
long ( j ) |
- |
E |
E |
E |
E |
I |
I |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
I |
|
float ( f ) |
- |
E |
E |
E |
E |
E |
I |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
I |
|
double ( d ) |
- |
E |
E |
E |
E |
E |
E |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
I |
|
Boolean ( O ) |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
I |
|
Byte ( B ) |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
I |
|
Short ( S ) |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
I |
|
Character ( C ) |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
I |
|
Integer ( I ) |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
I |
|
Long ( L ) |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
I |
|
Float ( F ) |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
I |
|
Double ( D ) |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
I |
|
String ( T ) |
- |
- |
- |
E |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
I |
|
Reference ( R ) |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
@ |
I |
@ See reference type casting for allowed reference type casts.
def
Type
o |
b |
s |
c |
i |
j |
f |
d |
O |
B |
S |
C |
I |
L |
F |
D |
T |
R |
def |
|
def as boolean |
I |
- |
- |
- |
- |
- |
- |
- |
I |
- |
- |
- |
- |
- |
- |
- |
- |
- |
|
def as byte |
- |
I |
I |
I |
I |
I |
I |
I |
- |
I |
I |
I |
I |
I |
I |
I |
- |
- |
|
def as short |
- |
E |
I |
E |
I |
I |
I |
I |
- |
E |
I |
E |
I |
I |
I |
I |
- |
- |
|
def as char |
- |
E |
E |
I |
I |
I |
I |
I |
- |
E |
E |
I |
I |
I |
I |
I |
E |
- |
|
def as int |
- |
E |
E |
E |
I |
I |
I |
I |
- |
E |
E |
E |
I |
I |
I |
I |
- |
- |
|
def as long |
- |
E |
E |
E |
E |
I |
I |
I |
- |
E |
E |
E |
E |
I |
I |
I |
- |
- |
|
def as float |
- |
E |
E |
E |
E |
E |
I |
I |
- |
E |
E |
E |
E |
E |
I |
I |
- |
- |
|
def as double |
- |
E |
E |
E |
E |
E |
E |
I |
- |
E |
E |
E |
E |
E |
E |
I |
- |
- |
|
def as Boolean |
I |
- |
- |
- |
- |
- |
- |
- |
I |
- |
- |
- |
- |
- |
- |
- |
- |
||
def as Byte |
- |
I |
I |
I |
I |
I |
I |
I |
- |
I |
I |
I |
I |
I |
I |
I |
- |
- |
|
def as Short |
- |
E |
I |
E |
I |
I |
I |
I |
- |
E |
I |
E |
I |
I |
I |
I |
- |
- |
|
def as Character |
- |
E |
E |
I |
I |
I |
I |
I |
- |
E |
E |
I |
I |
I |
I |
I |
- |
- |
|
def as Integer |
- |
E |
E |
E |
I |
I |
I |
I |
- |
E |
E |
E |
I |
I |
I |
I |
- |
- |
|
def as Long |
- |
E |
E |
E |
E |
I |
I |
I |
- |
E |
E |
E |
E |
I |
I |
I |
- |
- |
|
def as Float |
- |
E |
E |
E |
E |
E |
I |
I |
- |
E |
E |
E |
E |
E |
I |
I |
- |
- |
|
def as Double |
- |
E |
E |
E |
E |
E |
E |
I |
- |
E |
E |
E |
E |
E |
E |
I |
- |
- |
|
def as String |
- |
- |
- |
E |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
I |
- |
|
def as Reference |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
@ |
@ See reference type casting for allowed reference type casts.
Operators
An operator is the most basic action that can be taken to evaluate values in a script. An expression is one-to-many consecutive operations. Precedence is the order in which an operator will be evaluated relative to another operator. Associativity is the direction within an expression in which a specific operator is evaluated. The following table lists all available operators:
Operator |
Category |
Symbol(s) |
Precedence |
Associativity |
() |
0 |
left → right |
||
. () |
1 |
left → right |
||
. |
1 |
left → right |
||
?. |
1 |
left → right |
||
() |
1 |
left → right |
||
[] {} |
1 |
left → right |
||
[] |
1 |
left → right |
||
. |
1 |
left → right |
||
[] |
1 |
left → right |
||
[] |
1 |
left → right |
||
[:] |
1 |
left → right |
||
[] |
1 |
left → right |
||
++ |
1 |
left → right |
||
— |
1 |
left → right |
||
++ |
2 |
right → left |
||
— |
2 |
right → left |
||
+ |
2 |
right → left |
||
- |
2 |
right → left |
||
! |
2 |
right → left |
||
~ |
2 |
right → left |
||
() |
3 |
right → left |
||
new () |
3 |
right → left |
||
new [] |
3 |
right → left |
||
* |
4 |
left → right |
||
/ |
4 |
left → right |
||
% |
4 |
left → right |
||
+ |
5 |
left → right |
||
+ |
5 |
left → right |
||
- |
5 |
left → right |
||
<< |
6 |
left → right |
||
>> |
6 |
left → right |
||
>>> |
6 |
left → right |
||
> |
7 |
left → right |
||
>= |
7 |
left → right |
||
< |
7 |
left → right |
||
⇐ |
7 |
left → right |
||
instanceof |
8 |
left → right |
||
== |
9 |
left → right |
||
!= |
9 |
left → right |
||
=== |
9 |
left → right |
||
!== |
9 |
left → right |
||
& |
10 |
left → right |
||
^ |
11 |
left → right |
||
^ |
11 |
left → right |
||
| |
12 |
left → right |
||
&& |
13 |
left → right |
||
|| |
14 |
left → right |
||
? : |
15 |
right → left |
||
?: |
16 |
right → left |
||
= |
17 |
right → left |
||
$= |
17 |
right → left |
Operators: General
Precedence
Use the precedence operator '()'
to guarantee the order of evaluation for an
expression. An expression encapsulated by the precedence operator (enclosed in
parentheses) overrides existing precedence relationships between operators and
is evaluated prior to other expressions in inward-to-outward order.
Grammar
precedence: '(' expression ')';
Examples
-
Precedence with numeric operators.
int x = (5+4)*6; (1) int y = 12/(x-50); (2)
-
declare
int x
; addint 5
andint 4
→int 9
; multiplyint 9
andint 6
→int 54
; storeint 54
tox
; (note the add is evaluated before the multiply due to the precedence operator) -
declare
int y
; load fromx
→int 54
; subtractint 50
fromint 54
→int 4
; divideint 12
byint 4
→int 3
; storeint 3
toy
; (note the subtract is evaluated before the divide due to the precedence operator)
-
Function Call
Use the function call operator ()
to call an existing function. A
function call is defined within a script.
Grammar
function_call: ID '(' ( expression (',' expression)* )? ')'';
Examples
-
A function call.
int add(int x, int y) { (1) return x + y; } int z = add(1, 2); (2)
-
define function
add
that returnsint
and has parameters (int x
,int y
) -
declare
int z
; calladd
with arguments (int 1
,int 2
) →int 3
; storeint 3
toz
-
Cast
An explicit cast converts the value of an original type to the equivalent value
of a target type forcefully as an operation. Use the cast operator '()'
to
specify an explicit cast. Refer to casting for more
information.
Conditional
A conditional consists of three expressions. The first expression is evaluated
with an expected boolean result type. If the first expression evaluates to true
then the second expression will be evaluated. If the first expression evaluates
to false then the third expression will be evaluated. The second and third
expressions will be promoted if the evaluated values are not the
same type. Use the conditional operator '? :'
as a shortcut to avoid the need
for a full if/else branch in certain expressions.
Errors
-
If the first expression does not evaluate to a boolean type value.
-
If the values for the second and third expressions cannot be promoted.
Grammar
conditional: expression '?' expression ':' expression;
Promotion
byte |
short |
char |
int |
long |
float |
double |
Reference |
def |
|
byte |
int |
int |
int |
int |
long |
float |
double |
- |
def |
short |
int |
int |
int |
int |
long |
float |
double |
- |
def |
char |
int |
int |
int |
int |
long |
float |
double |
- |
def |
int |
int |
int |
int |
int |
long |
float |
double |
- |
def |
long |
long |
long |
long |
long |
long |
float |
double |
- |
def |
float |
float |
float |
float |
float |
float |
float |
double |
- |
def |
double |
double |
double |
double |
double |
double |
double |
double |
- |
def |
Reference |
- |
- |
- |
- |
- |
- |
- |
Object @ |
def |
def |
def |
def |
def |
def |
def |
def |
def |
def |
def |
@ If the two reference type values are the same then this promotion will not occur.
Examples
-
Evaluation of conditionals.
boolean b = true; (1) int x = b ? 1 : 2; (2) List y = x > 1 ? new ArrayList() : null; (3) def z = x < 2 ? x : 2.0; (4)
-
declare
boolean b
; storeboolean true
tob
-
declare
int x
; load fromb
→boolean true
evaluate 1st expression:int 1
→int 1
; storeint 1
tox
-
declare
List y
; load fromx
→int 1
;int 1
greater thanint 1
→boolean false
; evaluate 2nd expression:null
→null
; storenull
toy
; -
declare
def z
; load fromx
→int 1
;int 1
less thanint 2
→boolean true
; evaluate 1st expression: load fromx
→int 1
; promoteint 1
anddouble 2.0
: resultdouble
; implicit castint 1
todouble 1.0
→double 1.0
; implicit castdouble 1.0
todef
→def
; storedef
toz
;
-
Assignment
Use the assignment operator '='
to store a value in a variable or reference
type member field for use in subsequent operations. Any operation that produces
a value can be assigned to any variable/field as long as the
types are the same or the resultant type can be
implicitly cast to the variable/field type.
See variable assignment for examples using variables.
Errors
-
If the type of value is unable to match the type of variable or field.
Grammar
assignment: field '=' expression
Examples
The examples use the following reference type definition:
name:
Example
non-static member fields:
* int x
* def y
* List z
-
Field assignments of different type values.
Example example = new Example(); (1) example.x = 1; (2) example.y = 2.0; (3) example.z = new ArrayList(); (4)
-
declare
Example example
; allocateExample
instance →Example reference
; storeExample reference
toexample
-
load from
example
→Example reference
; storeint 1
tox
ofExample reference
-
load from
example
→Example reference
; implicit castdouble 2.0
todef
→def
; storedef
toy
ofExample reference
-
load from
example
→Example reference
; allocateArrayList
instance →ArrayList reference
; implicit castArrayList reference
toList reference
→List reference
; storeList reference
toz
ofExample reference
-
-
A field assignment from a field access.
Example example = new Example(); (1) example.x = 1; (2) example.y = example.x; (3)
-
declare
Example example
; allocateExample
instance →Example reference
; storeExample reference
toexample
-
load from
example
→Example reference
; storeint 1
tox
ofExample reference
-
load from
example
→Example reference @0
; load fromexample
→Example reference @1
; load fromx
ofExample reference @1
→int 1
; implicit castint 1
todef
→def
; storedef
toy
ofExample reference @0
; (noteExample reference @0
andExample reference @1
are the same)
-
Compound Assignment
Use the compound assignment operator '$='
as a shortcut for an assignment
where a binary operation would occur between the variable/field as the
left-hand side expression and a separate right-hand side expression.
A compound assignment is equivalent to the expression below where V is the variable/field and T is the type of variable/member.
V = (T)(V op expression);
Operators
The table below shows the available operators for use in a compound assignment. Each operator follows the casting/promotion rules according to their regular definition. For numeric operations there is an extra implicit cast when necessary to return the promoted numeric type value to the original numeric type value of the variable/field and can result in data loss.
Operator |
Compound Symbol |
Multiplication |
*= |
Division |
/= |
Remainder |
%= |
Addition |
+= |
Subtraction |
-= |
Left Shift |
<⇐ |
Right Shift |
>>= |
Unsigned Right Shift |
>>>= |
Bitwise And |
&= |
Boolean And |
&= |
Bitwise Xor |
^= |
Boolean Xor |
^= |
Bitwise Or |
|= |
Boolean Or |
|= |
String Concatenation |
+= |
Errors
-
If the type of value is unable to match the type of variable or field.
Grammar
compound_assignment: ( ID | field ) '$=' expression;
Note the use of the $=
represents the use of any of the possible binary
operators.
Examples
-
Compound assignment for each numeric operator.
int i = 10; (1) i *= 2; (2) i /= 5; (3) i %= 3; (4) i += 5; (5) i -= 5; (6) i <<= 2; (7) i >>= 1; (8) i >>>= 1; (9) i &= 15; (10) i ^= 12; (11) i |= 2; (12)
-
declare
int i
; storeint 10
toi
-
load from
i
→int 10
; multiplyint 10
andint 2
→int 20
; storeint 20
toi
; (note this is equivalent toi = i*2
) -
load from
i
→int 20
; divideint 20
byint 5
→int 4
; storeint 4
toi
; (note this is equivalent toi = i/5
) -
load from
i
→int 4
; remainderint 4
byint 3
→int 1
; storeint 1
toi
; (note this is equivalent toi = i%3
) -
load from
i
→int 1
; addint 1
andint 5
→int 6
; storeint 6
toi
; (note this is equivalent toi = i+5
) -
load from
i
→int 6
; subtractint 5
fromint 6
→int 1
; storeint 1
toi
; (note this is equivalent toi = i-5
) -
load from
i
→int 1
; left shiftint 1
byint 2
→int 4
; storeint 4
toi
; (note this is equivalent toi = i<<2
) -
load from
i
→int 4
; right shiftint 4
byint 1
→int 2
; storeint 2
toi
; (note this is equivalent toi = i>>1
) -
load from
i
→int 2
; unsigned right shiftint 2
byint 1
→int 1
; storeint 1
toi
; (note this is equivalent toi = i>>>1
) -
load from
i
→int 1
; bitwise andint 1
andint 15
→int 1
; storeint 1
toi
; (note this is equivalent toi = i&2
) -
load from
i
→int 1
; bitwise xorint 1
andint 12
→int 13
; storeint 13
toi
; (note this is equivalent toi = i^2
) -
load from
i
→int 13
; bitwise orint 13
andint 2
→int 15
; storeint 15
toi
; (note this is equivalent toi = i|2
)
-
-
Compound assignment for each boolean operator.
boolean b = true; (1) b &= false; (2) b ^= false; (3) b |= true; (4)
-
declare
boolean b
; storeboolean true
inb
; -
load from
b
→boolean true
; boolean andboolean true
andboolean false
→boolean false
; storeboolean false
tob
; (note this is equivalent tob = b && false
) -
load from
b
→boolean false
; boolean xorboolean false
andboolean false
→boolean false
; storeboolean false
tob
; (note this is equivalent tob = b ^ false
) -
load from
b
→boolean true
; boolean orboolean false
andboolean true
→boolean true
; storeboolean true
tob
; (note this is equivalent tob = b || true
)
-
-
A compound assignment with the string concatenation operator.
String s = 'compound'; (1) s += ' assignment'; (2)
-
declare
String s
; storeString 'compound'
tos
; -
load from
s
→String 'compound'
; string concatString 'compound'
andString ' assignment''
→String 'compound assignment'
; storeString 'compound assignment'
tos
; (note this is equivalent tos = s + ' assignment'
)
-
-
A compound assignment with the
def
type.def x = 1; (1) x += 2; (2)
-
declare
def x
; implicit castint 1
todef
; storedef
tox
; -
load from
x
→def
; implicit castdef
toint 1
→int 1
; addint 1
andint 2
→int 3
; implicit castint 3
todef
→def
; storedef
tox
; (note this is equivalent tox = x+2
)
-
-
A compound assignment with an extra implicit cast.
byte b = 1; (1) b += 2; (2)
-
declare
byte b
; storebyte 1
tox
; -
load from
x
→byte 1
; implicit castbyte 1 to `int 1
→int 1
; addint 1
andint 2
→int 3
; implicit castint 3
tobyte 3
→byte 3
; storebyte 3
tob
; (note this is equivalent tob = b+2
)
-
Operators: Numeric
Post Increment
Use the post increment operator '++'
to INCREASE the value of a numeric type
variable/field by 1
. An extra implicit cast is necessary to return the
promoted numeric type value to the original numeric type value of the
variable/field for the following types: byte
, short
, and char
. If a
variable/field is read as part of an expression the value is loaded prior to the
increment.
Errors
-
If the variable/field is a non-numeric type.
Grammar
post_increment: ( variable | field ) '++';
Promotion
original | promoted | implicit |
---|---|---|
byte |
int |
byte |
short |
int |
short |
char |
int |
char |
int |
int |
|
long |
long |
|
float |
float |
|
double |
double |
|
def |
def |
Examples
-
Post increment with different numeric types.
short i = 0; (1) i++; (2) long j = 1; (3) long k; (4) k = j++; (5)
-
declare
short i
; storeshort 0
toi
-
load from
i
→short 0
; promoteshort 0
: resultint
; addint 0
andint 1
→int 1
; implicit castint 1
toshort 1
; storeshort 1
toi
-
declare
long j
; implicit castint 1
tolong 1
→long 1
; storelong 1
toj
-
declare
long k
; store defaultlong 0
tok
-
load from
j
→long 1
; storelong 1
tok
; addlong 1
andlong 1
→long 2
; storelong 2
toj
-
-
Post increment with the
def
type.def x = 1; (1) x++; (2)
-
declare
def x
; implicit castint 1
todef
→def
; storedef
tox
-
load from
x
→def
; implicit castdef
toint 1
; addint 1
andint 1
→int 2
; implicit castint 2
todef
; storedef
tox
-
Post Decrement
Use the post decrement operator '--'
to DECREASE the value of a numeric type
variable/field by 1
. An extra implicit cast is necessary to return the
promoted numeric type value to the original numeric type value of the
variable/field for the following types: byte
, short
, and char
. If a
variable/field is read as part of an expression the value is loaded prior to
the decrement.
Errors
-
If the variable/field is a non-numeric type.
Grammar
post_decrement: ( variable | field ) '--';
Promotion
original | promoted | implicit |
---|---|---|
byte |
int |
byte |
short |
int |
short |
char |
int |
char |
int |
int |
|
long |
long |
|
float |
float |
|
double |
double |
|
def |
def |
Examples
-
Post decrement with different numeric types.
short i = 0; (1) i--; (2) long j = 1; (3) long k; (4) k = j--; (5)
-
declare
short i
; storeshort 0
toi
-
load from
i
→short 0
; promoteshort 0
: resultint
; subtractint 1
fromint 0
→int -1
; implicit castint -1
toshort -1
; storeshort -1
toi
-
declare
long j
; implicit castint 1
tolong 1
→long 1
; storelong 1
toj
-
declare
long k
; store defaultlong 0
tok
-
load from
j
→long 1
; storelong 1
tok
; subtractlong 1
fromlong 1
→long 0
; storelong 0
toj
-
-
Post decrement with the
def
type.def x = 1; (1) x--; (2)
-
declare
def x
; implicit castint 1
todef
→def
; storedef
tox
-
load from
x
→def
; implicit castdef
toint 1
; subtractint 1
fromint 1
→int 0
; implicit castint 0
todef
; storedef
tox
-
Pre Increment
Use the pre increment operator '++'
to INCREASE the value of a numeric type
variable/field by 1
. An extra implicit cast is necessary to return the
promoted numeric type value to the original numeric type value of the
variable/field for the following types: byte
, short
, and char
. If a
variable/field is read as part of an expression the value is loaded after the
increment.
Errors
-
If the variable/field is a non-numeric type.
Grammar
pre_increment: '++' ( variable | field );
Promotion
original | promoted | implicit |
---|---|---|
byte |
int |
byte |
short |
int |
short |
char |
int |
char |
int |
int |
|
long |
long |
|
float |
float |
|
double |
double |
|
def |
def |
Examples
-
Pre increment with different numeric types.
short i = 0; (1) ++i; (2) long j = 1; (3) long k; (4) k = ++j; (5)
-
declare
short i
; storeshort 0
toi
-
load from
i
→short 0
; promoteshort 0
: resultint
; addint 0
andint 1
→int 1
; implicit castint 1
toshort 1
; storeshort 1
toi
-
declare
long j
; implicit castint 1
tolong 1
→long 1
; storelong 1
toj
-
declare
long k
; store defaultlong 0
tok
-
load from
j
→long 1
; addlong 1
andlong 1
→long 2
; storelong 2
toj
; storelong 2
tok
-
-
Pre increment with the
def
type.def x = 1; (1) ++x; (2)
-
declare
def x
; implicit castint 1
todef
→def
; storedef
tox
-
load from
x
→def
; implicit castdef
toint 1
; addint 1
andint 1
→int 2
; implicit castint 2
todef
; storedef
tox
-
Pre Decrement
Use the pre decrement operator '--'
to DECREASE the value of a numeric type
variable/field by 1
. An extra implicit cast is necessary to return the
promoted numeric type value to the original numeric type value of the
variable/field for the following types: byte
, short
, and char
. If a
variable/field is read as part of an expression the value is loaded after the
decrement.
Errors
-
If the variable/field is a non-numeric type.
Grammar
pre_increment: '--' ( variable | field );
Promotion
original | promoted | implicit |
---|---|---|
byte |
int |
byte |
short |
int |
short |
char |
int |
char |
int |
int |
|
long |
long |
|
float |
float |
|
double |
double |
|
def |
def |
Examples
-
Pre decrement with different numeric types.
short i = 0; (1) --i; (2) long j = 1; (3) long k; (4) k = --j; (5)
-
declare
short i
; storeshort 0
toi
-
load from
i
→short 0
; promoteshort 0
: resultint
; subtractint 1
fromint 0
→int -1
; implicit castint -1
toshort -1
; storeshort -1
toi
-
declare
long j
; implicit castint 1
tolong 1
→long 1
; storelong 1
toj
-
declare
long k
; store defaultlong 0
tok
-
load from
j
→long 1
; subtractlong 1
fromlong 1
→long 0
; storelong 0
toj
storelong 0
tok
;
-
-
Pre decrement operator with the
def
type.def x = 1; (1) --x; (2)
-
declare
def x
; implicit castint 1
todef
→def
; storedef
tox
-
load from
x
→def
; implicit castdef
toint 1
; subtractint 1
fromint 1
→int 0
; implicit castint 0
todef
; storedef
tox
-
Unary Positive
Use the unary positive operator '+'
to the preserve the IDENTITY of a
numeric type value.
Errors
-
If the value is a non-numeric type.
Grammar
unary_positive: '+' expression;
Examples
-
Unary positive with different numeric types.
int x = +1; (1) long y = +x; (2)
-
declare
int x
; identityint 1
→int 1
; storeint 1
tox
-
declare
long y
; load fromx
→int 1
; identityint 1
→int 1
; implicit castint 1
tolong 1
→long 1
; storelong 1
toy
-
-
Unary positive with the
def
type.def z = +1; (1) int i = +z; (2)
-
declare
def z
; identityint 1
→int 1
; implicit castint 1
todef
; storedef
toz
-
declare
int i
; load fromz
→def
; implicit castdef
toint 1
; identityint 1
→int 1
; storeint 1
toi
;
-
Unary Negative
Use the unary negative operator '-'
to NEGATE a numeric type value.
Errors
-
If the value is a non-numeric type.
Grammar
unary_negative: '-' expression;
Examples
-
Unary negative with different numeric types.
int x = -1; (1) long y = -x; (2)
-
declare
int x
; negateint 1
→int -1
; storeint -1
tox
-
declare
long y
; load fromx
→int 1
; negateint -1
→int 1
; implicit castint 1
tolong 1
→long 1
; storelong 1
toy
-
-
Unary negative with the
def
type.def z = -1; (1) int i = -z; (2)
-
declare
def z
; negateint 1
→int -1
; implicit castint -1
todef
; storedef
toz
-
declare
int i
; load fromz
→def
; implicit castdef
toint -1
; negateint -1
→int 1
; storeint 1
toi
;
-
Bitwise Not
Use the bitwise not operator '~'
to NOT each bit in an integer type value
where a 1-bit
is flipped to a resultant 0-bit
and a 0-bit
is flipped to a
resultant 1-bit
.
Errors
-
If the value is a non-integer type.
Bits
original | result |
---|---|
1 |
0 |
0 |
1 |
Grammar
bitwise_not: '~' expression;
Promotion
original | promoted |
---|---|
byte |
int |
short |
int |
char |
int |
int |
int |
long |
long |
def |
def |
Examples
-
Bitwise not with different numeric types.
byte b = 1; (1) int i = ~b; (2) long l = ~i; (3)
-
declare
byte x
; storebyte 1
to b -
declare
int i
; load fromb
→byte 1
; implicit castbyte 1
toint 1
→int 1
; bitwise notint 1
→int -2
; storeint -2
toi
-
declare
long l
; load fromi
→int -2
; implicit castint -2
tolong -2
→long -2
; bitwise notlong -2
→long 1
; storelong 1
tol
-
-
Bitwise not with the
def
type.def d = 1; (1) def e = ~d; (2)
-
declare
def d
; implicit castint 1
todef
→def
; storedef
tod
; -
declare
def e
; load fromd
→def
; implicit castdef
toint 1
→int 1
; bitwise notint 1
→int -2
; implicit castint 1
todef
→def
; storedef
toe
-
Multiplication
Use the multiplication operator '*'
to MULTIPLY together two numeric type
values. Rules for resultant overflow and NaN values follow the JVM
specification.
Errors
-
If either of the values is a non-numeric type.
Grammar
multiplication: expression '*' expression;
Promotion
byte |
short |
char |
int |
long |
float |
double |
def |
|
byte |
int |
int |
int |
int |
long |
float |
double |
def |
short |
int |
int |
int |
int |
long |
float |
double |
def |
char |
int |
int |
int |
int |
long |
float |
double |
def |
int |
int |
int |
int |
int |
long |
float |
double |
def |
long |
long |
long |
long |
long |
long |
float |
double |
def |
float |
float |
float |
float |
float |
float |
float |
double |
def |
double |
double |
double |
double |
double |
double |
double |
double |
def |
def |
def |
def |
def |
def |
def |
def |
def |
def |
Examples
-
Multiplication with different numeric types.
int i = 5*4; (1) double d = i*7.0; (2)
-
declare
int i
; multiplyint 4
byint 5
→int 20
; storeint 20
ini
-
declare
double d
; load fromint i
→int 20
; promoteint 20
anddouble 7.0
: resultdouble
; implicit castint 20
todouble 20.0
→double 20.0
; multiplydouble 20.0
bydouble 7.0
→double 140.0
; storedouble 140.0
tod
-
-
Multiplication with the
def
type.def x = 5*4; (1) def y = x*2; (2)
-
declare
def x
; multiplyint 5
byint 4
→int 20
; implicit castint 20
todef
→def
; storedef
inx
-
declare
def y
; load fromx
→def
; implicit castdef
toint 20
; multiplyint 20
byint 2
→int 40
; implicit castint 40
todef
→def
; storedef
toy
-
Division
Use the division operator '/'
to DIVIDE one numeric type value by another.
Rules for NaN values and division by zero follow the JVM specification. Division
with integer values drops the remainder of the resultant value.
Errors
-
If either of the values is a non-numeric type.
-
If a left-hand side integer type value is divided by a right-hand side integer type value of
0
.
Grammar
division: expression '/' expression;
Promotion
byte |
short |
char |
int |
long |
float |
double |
def |
|
byte |
int |
int |
int |
int |
long |
float |
double |
def |
short |
int |
int |
int |
int |
long |
float |
double |
def |
char |
int |
int |
int |
int |
long |
float |
double |
def |
int |
int |
int |
int |
int |
long |
float |
double |
def |
long |
long |
long |
long |
long |
long |
float |
double |
def |
float |
float |
float |
float |
float |
float |
float |
double |
def |
double |
double |
double |
double |
double |
double |
double |
double |
def |
def |
def |
def |
def |
def |
def |
def |
def |
def |
Examples
-
Division with different numeric types.
int i = 29/4; (1) double d = i/7.0; (2)
-
declare
int i
; divideint 29
byint 4
→int 7
; storeint 7
ini
-
declare
double d
; load fromint i
→int 7
; promoteint 7
anddouble 7.0
: resultdouble
; implicit castint 7
todouble 7.0
→double 7.0
; dividedouble 7.0
bydouble 7.0
→double 1.0
; storedouble 1.0
tod
-
-
Division with the
def
type.def x = 5/4; (1) def y = x/2; (2)
-
declare
def x
; divideint 5
byint 4
→int 1
; implicit castint 1
todef
→def
; storedef
inx
-
declare
def y
; load fromx
→def
; implicit castdef
toint 1
; divideint 1
byint 2
→int 0
; implicit castint 0
todef
→def
; storedef
toy
-
Remainder
Use the remainder operator '%'
to calculate the REMAINDER for division
between two numeric type values. Rules for NaN values and division by zero follow the JVM
specification.
Errors
-
If either of the values is a non-numeric type.
Grammar
remainder: expression '%' expression;
Promotion
byte |
short |
char |
int |
long |
float |
double |
def |
|
byte |
int |
int |
int |
int |
long |
float |
double |
def |
short |
int |
int |
int |
int |
long |
float |
double |
def |
char |
int |
int |
int |
int |
long |
float |
double |
def |
int |
int |
int |
int |
int |
long |
float |
double |
def |
long |
long |
long |
long |
long |
long |
float |
double |
def |
float |
float |
float |
float |
float |
float |
float |
double |
def |
double |
double |
double |
double |
double |
double |
double |
double |
def |
def |
def |
def |
def |
def |
def |
def |
def |
def |
Examples
-
Remainder with different numeric types.
int i = 29%4; (1) double d = i%7.0; (2)
-
declare
int i
; remainderint 29
byint 4
→int 1
; storeint 7
ini
-
declare
double d
; load fromint i
→int 1
; promoteint 1
anddouble 7.0
: resultdouble
; implicit castint 1
todouble 1.0
→double 1.0
; remainderdouble 1.0
bydouble 7.0
→double 1.0
; storedouble 1.0
tod
-
-
Remainder with the
def
type.def x = 5%4; (1) def y = x%2; (2)
-
declare
def x
; remainderint 5
byint 4
→int 1
; implicit castint 1
todef
→def
; storedef
inx
-
declare
def y
; load fromx
→def
; implicit castdef
toint 1
; remainderint 1
byint 2
→int 1
; implicit castint 1
todef
→def
; storedef
toy
-
Addition
Use the addition operator '+'
to ADD together two numeric type values. Rules
for resultant overflow and NaN values follow the JVM specification.
Errors
-
If either of the values is a non-numeric type.
Grammar
addition: expression '+' expression;
Promotion
byte |
short |
char |
int |
long |
float |
double |
def |
|
byte |
int |
int |
int |
int |
long |
float |
double |
def |
short |
int |
int |
int |
int |
long |
float |
double |
def |
char |
int |
int |
int |
int |
long |
float |
double |
def |
int |
int |
int |
int |
int |
long |
float |
double |
def |
long |
long |
long |
long |
long |
long |
float |
double |
def |
float |
float |
float |
float |
float |
float |
float |
double |
def |
double |
double |
double |
double |
double |
double |
double |
double |
def |
def |
def |
def |
def |
def |
def |
def |
def |
def |
Examples
-
Addition operator with different numeric types.
int i = 29+4; (1) double d = i+7.0; (2)
-
declare
int i
; addint 29
andint 4
→int 33
; storeint 33
ini
-
declare
double d
; load fromint i
→int 33
; promoteint 33
anddouble 7.0
: resultdouble
; implicit castint 33
todouble 33.0
→double 33.0
; adddouble 33.0
anddouble 7.0
→double 40.0
; storedouble 40.0
tod
-
-
Addition with the
def
type.def x = 5+4; (1) def y = x+2; (2)
-
declare
def x
; addint 5
andint 4
→int 9
; implicit castint 9
todef
→def
; storedef
inx
-
declare
def y
; load fromx
→def
; implicit castdef
toint 9
; addint 9
andint 2
→int 11
; implicit castint 11
todef
→def
; storedef
toy
-
Subtraction
Use the subtraction operator '-'
to SUBTRACT a right-hand side numeric type
value from a left-hand side numeric type value. Rules for resultant overflow
and NaN values follow the JVM specification.
Errors
-
If either of the values is a non-numeric type.
Grammar
subtraction: expression '-' expression;
Promotion
byte |
short |
char |
int |
long |
float |
double |
def |
|
byte |
int |
int |
int |
int |
long |
float |
double |
def |
short |
int |
int |
int |
int |
long |
float |
double |
def |
char |
int |
int |
int |
int |
long |
float |
double |
def |
int |
int |
int |
int |
int |
long |
float |
double |
def |
long |
long |
long |
long |
long |
long |
float |
double |
def |
float |
float |
float |
float |
float |
float |
float |
double |
def |
double |
double |
double |
double |
double |
double |
double |
double |
def |
def |
def |
def |
def |
def |
def |
def |
def |
def |
Examples
-
Subtraction with different numeric types.
int i = 29-4; (1) double d = i-7.5; (2)
-
declare
int i
; subtractint 4
fromint 29
→int 25
; storeint 25
ini
-
declare
double d
load fromint i
→int 25
; promoteint 25
anddouble 7.5
: resultdouble
; implicit castint 25
todouble 25.0
→double 25.0
; subtractdouble 33.0
bydouble 7.5
→double 25.5
; storedouble 25.5
tod
-
-
Subtraction with the
def
type.def x = 5-4; (1) def y = x-2; (2)
-
declare
def x
; subtractint 4
andint 5
→int 1
; implicit castint 1
todef
→def
; storedef
inx
-
declare
def y
; load fromx
→def
; implicit castdef
toint 1
; subtractint 2
fromint 1
→int -1
; implicit castint -1
todef
→def
; storedef
toy
-
Left Shift
Use the left shift operator '<<'
to SHIFT lower order bits to higher order
bits in a left-hand side integer type value by the distance specified in a
right-hand side integer type value.
Errors
-
If either of the values is a non-integer type.
-
If the right-hand side value cannot be cast to an int type.
Grammar
left_shift: expression '<<' expression;
Promotion
The left-hand side integer type value is promoted as specified in the table
below. The right-hand side integer type value is always implicitly cast to an
int
type value and truncated to the number of bits of the promoted type value.
original | promoted |
---|---|
byte |
int |
short |
int |
char |
int |
int |
int |
long |
long |
def |
def |
Examples
-
Left shift with different integer types.
int i = 4 << 1; (1) long l = i << 2L; (2)
-
declare
int i
; left shiftint 4
byint 1
→int 8
; storeint 8
ini
-
declare
long l
load fromint i
→int 8
; implicit castlong 2
toint 2
→int 2
; left shiftint 8
byint 2
→int 32
; implicit castint 32
tolong 32
→long 32
; storelong 32
tol
-
-
Left shift with the
def
type.def x = 4 << 2; (1) def y = x << 1; (2)
-
declare
def x
; left shiftint 4
byint 2
→int 16
; implicit castint 16
todef
→def
; storedef
inx
-
declare
def y
; load fromx
→def
; implicit castdef
toint 16
; left shiftint 16
byint 1
→int 32
; implicit castint 32
todef
→def
; storedef
toy
-
Right Shift
Use the right shift operator '>>'
to SHIFT higher order bits to lower order
bits in a left-hand side integer type value by the distance specified in a
right-hand side integer type value. The highest order bit of the left-hand side
integer type value is preserved.
Errors
-
If either of the values is a non-integer type.
-
If the right-hand side value cannot be cast to an int type.
Grammar
right_shift: expression '>>' expression;
Promotion
The left-hand side integer type value is promoted as specified in the table
below. The right-hand side integer type value is always implicitly cast to an
int
type value and truncated to the number of bits of the promoted type value.
original | promoted |
---|---|
byte |
int |
short |
int |
char |
int |
int |
int |
long |
long |
def |
def |
Examples
-
Right shift with different integer types.
int i = 32 >> 1; (1) long l = i >> 2L; (2)
-
declare
int i
; right shiftint 32
byint 1
→int 16
; storeint 16
ini
-
declare
long l
load fromint i
→int 16
; implicit castlong 2
toint 2
→int 2
; right shiftint 16
byint 2
→int 4
; implicit castint 4
tolong 4
→long 4
; storelong 4
tol
-
-
Right shift with the
def
type.def x = 16 >> 2; (1) def y = x >> 1; (2)
-
declare
def x
; right shiftint 16
byint 2
→int 4
; implicit castint 4
todef
→def
; storedef
inx
-
declare
def y
; load fromx
→def
; implicit castdef
toint 4
; right shiftint 4
byint 1
→int 2
; implicit castint 2
todef
→def
; storedef
toy
-
Unsigned Right Shift
Use the unsigned right shift operator '>>>'
to SHIFT higher order bits to
lower order bits in a left-hand side integer type value by the distance
specified in a right-hand side type integer value. The highest order bit of the
left-hand side integer type value is not preserved.
Errors
-
If either of the values is a non-integer type.
-
If the right-hand side value cannot be cast to an int type.
Grammar
unsigned_right_shift: expression '>>>' expression;
Promotion
The left-hand side integer type value is promoted as specified in the table
below. The right-hand side integer type value is always implicitly cast to an
int
type value and truncated to the number of bits of the promoted type value.
original | promoted |
---|---|
byte |
int |
short |
int |
char |
int |
int |
int |
long |
long |
def |
def |
Examples
-
Unsigned right shift with different integer types.
int i = -1 >>> 29; (1) long l = i >>> 2L; (2)
-
declare
int i
; unsigned right shiftint -1
byint 29
→int 7
; storeint 7
ini
-
declare
long l
load fromint i
→int 7
; implicit castlong 2
toint 2
→int 2
; unsigned right shiftint 7
byint 2
→int 3
; implicit castint 3
tolong 3
→long 3
; storelong 3
tol
-
-
Unsigned right shift with the
def
type.def x = 16 >>> 2; (1) def y = x >>> 1; (2)
-
declare
def x
; unsigned right shiftint 16
byint 2
→int 4
; implicit castint 4
todef
→def
; storedef
inx
-
declare
def y
; load fromx
→def
; implicit castdef
toint 4
; unsigned right shiftint 4
byint 1
→int 2
; implicit castint 2
todef
→def
; storedef
toy
-
Bitwise And
Use the bitwise and operator '&'
to AND together each bit within two
integer type values where if both bits at the same index are 1
the resultant
bit is 1
and 0
otherwise.
Errors
-
If either of the values is a non-integer type.
Bits
1 |
0 |
|
1 |
1 |
0 |
0 |
0 |
0 |
Grammar
bitwise_and: expression '&' expression;
Promotion
byte |
short |
char |
int |
long |
def |
|
byte |
int |
int |
int |
int |
long |
def |
short |
int |
int |
int |
int |
long |
def |
char |
int |
int |
int |
int |
long |
def |
int |
int |
int |
int |
int |
long |
def |
long |
long |
long |
long |
long |
long |
def |
def |
def |
def |
def |
def |
def |
def |
Examples
-
Bitwise and with different integer types.
int i = 5 & 6; (1) long l = i & 5L; (2)
-
declare
int i
; bitwise andint 5
andint 6
→int 4
; storeint 4
ini
-
declare
long l
load fromint i
→int 4
; promoteint 4
andlong 5
: resultlong
; implicit castint 4
tolong 4
→long 4
; bitwise andlong 4
andlong 5
→long 4
; storelong 4
tol
-
-
Bitwise and with the
def
type.def x = 15 & 6; (1) def y = x & 5; (2)
-
declare
def x
; bitwise andint 15
andint 6
→int 6
; implicit castint 6
todef
→def
; storedef
inx
-
declare
def y
; load fromx
→def
; implicit castdef
toint 6
; bitwise andint 6
andint 5
→int 4
; implicit castint 4
todef
→def
; storedef
toy
-
Bitwise Xor
Use the bitwise xor operator '^'
to XOR together each bit within two integer
type values where if one bit is a 1
and the other bit is a 0
at the same
index the resultant bit is 1
otherwise the resultant bit is 0
.
Errors
-
If either of the values is a non-integer type.
Bits
The following table illustrates the resultant bit from the xoring of two bits.
1 |
0 |
|
1 |
0 |
1 |
0 |
1 |
0 |
Grammar
bitwise_xor: expression '^' expression;
Promotion
byte |
short |
char |
int |
long |
def |
|
byte |
int |
int |
int |
int |
long |
def |
short |
int |
int |
int |
int |
long |
def |
char |
int |
int |
int |
int |
long |
def |
int |
int |
int |
int |
int |
long |
def |
long |
long |
long |
long |
long |
long |
def |
def |
def |
def |
def |
def |
def |
def |
Examples
-
Bitwise xor with different integer types.
int i = 5 ^ 6; (1) long l = i ^ 5L; (2)
-
declare
int i
; bitwise xorint 5
andint 6
→int 3
; storeint 3
ini
-
declare
long l
load fromint i
→int 4
; promoteint 3
andlong 5
: resultlong
; implicit castint 3
tolong 3
→long 3
; bitwise xorlong 3
andlong 5
→long 6
; storelong 6
tol
-
-
Bitwise xor with the
def
type.def x = 15 ^ 6; (1) def y = x ^ 5; (2)
-
declare
def x
; bitwise xorint 15
andint 6
→int 9
; implicit castint 9
todef
→def
; storedef
inx
-
declare
def y
; load fromx
→def
; implicit castdef
toint 9
; bitwise xorint 9
andint 5
→int 12
; implicit castint 12
todef
→def
; storedef
toy
-
Bitwise Or
Use the bitwise or operator '|'
to OR together each bit within two integer
type values where if at least one bit is a 1
at the same index the resultant
bit is 1
otherwise the resultant bit is 0
.
Errors
-
If either of the values is a non-integer type.
Bits
The following table illustrates the resultant bit from the oring of two bits.
1 |
0 |
|
1 |
1 |
1 |
0 |
1 |
0 |
Grammar
bitwise_or: expression '|' expression;
Promotion
byte |
short |
char |
int |
long |
def |
|
byte |
int |
int |
int |
int |
long |
def |
short |
int |
int |
int |
int |
long |
def |
char |
int |
int |
int |
int |
long |
def |
int |
int |
int |
int |
int |
long |
def |
long |
long |
long |
long |
long |
long |
def |
def |
def |
def |
def |
def |
def |
def |
Examples
-
Bitwise or with different integer types.
int i = 5 | 6; (1) long l = i | 8L; (2)
-
declare
int i
; bitwise orint 5
andint 6
→int 7
; storeint 7
ini
-
declare
long l
load fromint i
→int 7
; promoteint 7
andlong 8
: resultlong
; implicit castint 7
tolong 7
→long 7
; bitwise orlong 7
andlong 8
→long 15
; storelong 15
tol
-
-
Bitwise or with the
def
type.def x = 5 ^ 6; (1) def y = x ^ 8; (2)
-
declare
def x
; bitwise orint 5
andint 6
→int 7
; implicit castint 7
todef
→def
; storedef
inx
-
declare
def y
; load fromx
→def
; implicit castdef
toint 7
; bitwise orint 7
andint 8
→int 15
; implicit castint 15
todef
→def
; storedef
toy
-
Operators: Boolean
Boolean Not
Use the boolean not operator '!'
to NOT a boolean
type value where true
is
flipped to false
and false
is flipped to true
.
Errors
-
If a value other than a
boolean
type value or a value that is castable to aboolean
type value is given.
Truth
original | result |
---|---|
true |
false |
false |
true |
Grammar
boolean_not: '!' expression;
Examples
-
Boolean not with the
boolean
type.boolean x = !false; (1) boolean y = !x; (2)
-
declare
boolean x
; boolean notboolean false
→boolean true
; storeboolean true
tox
-
declare
boolean y
; load fromx
→boolean true
; boolean notboolean true
→boolean false
; storeboolean false
toy
-
-
Boolean not with the
def
type.def y = true; (1) def z = !y; (2)
-
declare
def y
; implicit castboolean true
todef
→def
; storetrue
toy
-
declare
def z
; load fromy
→def
; implicit castdef
toboolean true
→ booleantrue
; boolean notboolean true
→boolean false
; implicit castboolean false
todef
→def
; storedef
toz
-
Greater Than
Use the greater than operator '>'
to COMPARE two numeric type values where a
resultant boolean
type value is true
if the left-hand side value is greater
than to the right-hand side value and false
otherwise.
Errors
-
If either the evaluated left-hand side or the evaluated right-hand side is a non-numeric value.
Grammar
greater_than: expression '>' expression;
Promotion
byte |
short |
char |
int |
long |
float |
double |
def |
|
byte |
int |
int |
int |
int |
long |
float |
double |
def |
short |
int |
int |
int |
int |
long |
float |
double |
def |
char |
int |
int |
int |
int |
long |
float |
double |
def |
int |
int |
int |
int |
int |
long |
float |
double |
def |
long |
long |
long |
long |
long |
long |
float |
double |
def |
float |
float |
float |
float |
float |
float |
float |
double |
def |
double |
double |
double |
double |
double |
double |
double |
double |
def |
def |
def |
def |
def |
def |
def |
def |
def |
def |
Examples
-
Greater than with different numeric types.
boolean x = 5 > 4; (1) double y = 6.0; (2) x = 6 > y; (3)
-
declare
boolean x
; greater thanint 5
andint 4
→boolean true
; storeboolean true
tox
; -
declare
double y
; storedouble 6.0
toy
; -
load from
y
→double 6.0 @0
; promoteint 6
anddouble 6.0
: resultdouble
; implicit castint 6
todouble 6.0 @1
→double 6.0 @1
; greater thandouble 6.0 @1
anddouble 6.0 @0
→boolean false
; storeboolean false
tox
-
-
Greater than with
def
type.int x = 5; (1) def y = 7.0; (2) def z = y > 6.5; (3) def a = x > y; (4)
-
declare
int x
; storeint 5
tox
-
declare
def y
; implicit castdouble 7.0
todef
→def
; storedef
toy
-
declare
def z
; load fromy
→def
; implicit castdef
todouble 7.0
→double 7.0
; greater thandouble 7.0
anddouble 6.5
→boolean true
; implicit castboolean true
todef
→def
; storedef
toz
-
declare
def a
; load fromy
→def
; implicit castdef
todouble 7.0
→double 7.0
; load fromx
→int 5
; promoteint 5
anddouble 7.0
: resultdouble
; implicit castint 5
todouble 5.0
→double 5.0
; greater thandouble 5.0
anddouble 7.0
→boolean false
; implicit castboolean false
todef
→def
; storedef
toz
-
Greater Than Or Equal
Use the greater than or equal operator '>='
to COMPARE two numeric type values
where a resultant boolean
type value is true
if the left-hand side value is
greater than or equal to the right-hand side value and false
otherwise.
Errors
-
If either the evaluated left-hand side or the evaluated right-hand side is a non-numeric value.
Grammar
greater_than_or_equal: expression '>=' expression;
Promotion
byte |
short |
char |
int |
long |
float |
double |
def |
|
byte |
int |
int |
int |
int |
long |
float |
double |
def |
short |
int |
int |
int |
int |
long |
float |
double |
def |
char |
int |
int |
int |
int |
long |
float |
double |
def |
int |
int |
int |
int |
int |
long |
float |
double |
def |
long |
long |
long |
long |
long |
long |
float |
double |
def |
float |
float |
float |
float |
float |
float |
float |
double |
def |
double |
double |
double |
double |
double |
double |
double |
double |
def |
def |
def |
def |
def |
def |
def |
def |
def |
def |
Examples
-
Greater than or equal with different numeric types.
boolean x = 5 >= 4; (1) double y = 6.0; (2) x = 6 >= y; (3)
-
declare
boolean x
; greater than or equalint 5
andint 4
→boolean true
; storeboolean true
tox
-
declare
double y
; storedouble 6.0
toy
-
load from
y
→double 6.0 @0
; promoteint 6
anddouble 6.0
: resultdouble
; implicit castint 6
todouble 6.0 @1
→double 6.0 @1
; greater than or equaldouble 6.0 @1
anddouble 6.0 @0
→boolean true
; storeboolean true
tox
-
-
Greater than or equal with the
def
type.int x = 5; (1) def y = 7.0; (2) def z = y >= 7.0; (3) def a = x >= y; (4)
-
declare
int x
; storeint 5
tox
; -
declare
def y
implicit castdouble 7.0
todef
→def
; storedef
toy
-
declare
def z
; load fromy
→def
; implicit castdef
todouble 7.0 @0
→double 7.0 @0
; greater than or equaldouble 7.0 @0
anddouble 7.0 @1
→boolean true
; implicit castboolean true
todef
→def
; storedef
toz
-
declare
def a
; load fromy
→def
; implicit castdef
todouble 7.0
→double 7.0
; load fromx
→int 5
; promoteint 5
anddouble 7.0
: resultdouble
; implicit castint 5
todouble 5.0
→double 5.0
; greater than or equaldouble 5.0
anddouble 7.0
→boolean false
; implicit castboolean false
todef
→def
; storedef
toz
-
Less Than
Use the less than operator '<'
to COMPARE two numeric type values where a
resultant boolean
type value is true
if the left-hand side value is less
than to the right-hand side value and false
otherwise.
Errors
-
If either the evaluated left-hand side or the evaluated right-hand side is a non-numeric value.
Grammar
less_than: expression '<' expression;
Promotion
byte |
short |
char |
int |
long |
float |
double |
def |
|
byte |
int |
int |
int |
int |
long |
float |
double |
def |
short |
int |
int |
int |
int |
long |
float |
double |
def |
char |
int |
int |
int |
int |
long |
float |
double |
def |
int |
int |
int |
int |
int |
long |
float |
double |
def |
long |
long |
long |
long |
long |
long |
float |
double |
def |
float |
float |
float |
float |
float |
float |
float |
double |
def |
double |
double |
double |
double |
double |
double |
double |
double |
def |
def |
def |
def |
def |
def |
def |
def |
def |
def |
Examples
-
Less than with different numeric types.
boolean x = 5 < 4; (1) double y = 6.0; (2) x = 6 < y; (3)
-
declare
boolean x
; less thanint 5
andint 4
→boolean false
; storeboolean false
tox
-
declare
double y
; storedouble 6.0
toy
-
load from
y
→double 6.0 @0
; promoteint 6
anddouble 6.0
: resultdouble
; implicit castint 6
todouble 6.0 @1
→double 6.0 @1
; less thandouble 6.0 @1
anddouble 6.0 @0
→boolean false
; storeboolean false
tox
-
-
Less than with the
def
type.int x = 5; (1) def y = 7.0; (2) def z = y < 6.5; (3) def a = x < y; (4)
-
declare
int x
; storeint 5
tox
-
declare
def y
; implicit castdouble 7.0
todef
→def
; storedef
toy
-
declare
def z
; load fromy
→def
; implicit castdef
todouble 7.0
→double 7.0
; less thandouble 7.0
anddouble 6.5
→boolean false
; implicit castboolean false
todef
→def
; storedef
toz
-
declare
def a
; load fromy
→def
; implicit castdef
todouble 7.0
→double 7.0
; load fromx
→int 5
; promoteint 5
anddouble 7.0
: resultdouble
; implicit castint 5
todouble 5.0
→double 5.0
; less thandouble 5.0
anddouble 7.0
→boolean true
; implicit castboolean true
todef
→def
; storedef
toz
-
Less Than Or Equal
Use the less than or equal operator '⇐'
to COMPARE two numeric type values
where a resultant boolean
type value is true
if the left-hand side value is
less than or equal to the right-hand side value and false
otherwise.
Errors
-
If either the evaluated left-hand side or the evaluated right-hand side is a non-numeric value.
Grammar
greater_than_or_equal: expression '<=' expression;
Promotion
byte |
short |
char |
int |
long |
float |
double |
def |
|
byte |
int |
int |
int |
int |
long |
float |
double |
def |
short |
int |
int |
int |
int |
long |
float |
double |
def |
char |
int |
int |
int |
int |
long |
float |
double |
def |
int |
int |
int |
int |
int |
long |
float |
double |
def |
long |
long |
long |
long |
long |
long |
float |
double |
def |
float |
float |
float |
float |
float |
float |
float |
double |
def |
double |
double |
double |
double |
double |
double |
double |
double |
def |
def |
def |
def |
def |
def |
def |
def |
def |
def |
Examples
-
Less than or equal with different numeric types.
boolean x = 5 <= 4; (1) double y = 6.0; (2) x = 6 <= y; (3)
-
declare
boolean x
; less than or equalint 5
andint 4
→boolean false
; storeboolean true
tox
-
declare
double y
; storedouble 6.0
toy
-
load from
y
→double 6.0 @0
; promoteint 6
anddouble 6.0
: resultdouble
; implicit castint 6
todouble 6.0 @1
→double 6.0 @1
; less than or equaldouble 6.0 @1
anddouble 6.0 @0
→boolean true
; storeboolean true
tox
-
-
Less than or equal with the
def
type.int x = 5; (1) def y = 7.0; (2) def z = y <= 7.0; (3) def a = x <= y; (4)
-
declare
int x
; storeint 5
tox
; -
declare
def y
; implicit castdouble 7.0
todef
→def
; storedef
toy
; -
declare
def z
; load fromy
→def
; implicit castdef
todouble 7.0 @0
→double 7.0 @0
; less than or equaldouble 7.0 @0
anddouble 7.0 @1
→boolean true
; implicit castboolean true
todef
→def
; storedef
toz
-
declare
def a
; load fromy
→def
; implicit castdef
todouble 7.0
→double 7.0
; load fromx
→int 5
; promoteint 5
anddouble 7.0
: resultdouble
; implicit castint 5
todouble 5.0
→double 5.0
; less than or equaldouble 5.0
anddouble 7.0
→boolean true
; implicit castboolean true
todef
→def
; storedef
toz
-
Instanceof
Use the instanceof operator
to COMPARE the variable/field type to a
specified reference type using the reference type name where a resultant
boolean
type value is true
if the variable/field type is the same as or a
descendant of the specified reference type and false otherwise.
Errors
-
If the reference type name doesn’t exist as specified by the right-hand side.
Grammar
instance_of: ID 'instanceof' TYPE;
Examples
-
Instance of with different reference types.
Map m = new HashMap(); (1) boolean a = m instanceof HashMap; (2) boolean b = m instanceof Map; (3)
-
declare
Map m
; allocateHashMap
instance →HashMap reference
; implicit castHashMap reference
toMap reference
; storeMap reference
tom
-
declare
boolean a
; load fromm
→Map reference
; implicit castMap reference
toHashMap reference
→HashMap reference
; instanceofHashMap reference
andHashMap
→boolean true
; storeboolean true
toa
-
declare
boolean b
; load fromm
→Map reference
; implicit castMap reference
toHashMap reference
→HashMap reference
; instanceofHashMap reference
andMap
→boolean true
; storetrue
tob
; (noteHashMap
is a descendant ofMap
)
-
-
Instance of with the
def
type.def d = new ArrayList(); (1) boolean a = d instanceof List; (2) boolean b = d instanceof Map; (3)
-
declare
def d
; allocateArrayList
instance →ArrayList reference
; implicit castArrayList reference
todef
→def
; storedef
tod
-
declare
boolean a
; load fromd
→def
; implicit castdef
toArrayList reference
→ArrayList reference
; instanceofArrayList reference
andList
→boolean true
; storeboolean true
toa
; (noteArrayList
is a descendant ofList
) -
declare
boolean b
; load fromd
→def
; implicit castdef
toArrayList reference
→ArrayList reference
; instanceofArrayList reference
andMap
→boolean false
; storeboolean false
toa
; (noteArrayList
is not a descendant ofMap
)
-
Equality Equals
Use the equality equals operator '=='
to COMPARE two values where a resultant
boolean
type value is true
if the two values are equal and false
otherwise. The member method, equals
, is implicitly called when the values are
reference type values where the first value is the target of the call and the
second value is the argument. This operation is null-safe where if both values
are null
the resultant boolean
type value is true
, and if only one value
is null
the resultant boolean
type value is false
. A valid comparison is
between boolean
type values, numeric type values, or reference type values.
Errors
-
If a comparison is made between a
boolean
type value and numeric type value. -
If a comparison is made between a primitive type value and a reference type value.
Grammar
equality_equals: expression '==' expression;
Promotion
boolean |
byte |
short |
char |
int |
long |
float |
double |
Reference |
def |
|
boolean |
boolean |
- |
- |
- |
- |
- |
- |
- |
- |
def |
byte |
- |
int |
int |
int |
int |
long |
float |
double |
- |
def |
short |
- |
int |
int |
int |
int |
long |
float |
double |
- |
def |
char |
- |
int |
int |
int |
int |
long |
float |
double |
- |
def |
int |
- |
int |
int |
int |
int |
long |
float |
double |
- |
def |
long |
- |
long |
long |
long |
long |
long |
float |
double |
- |
def |
float |
- |
float |
float |
float |
float |
float |
float |
double |
- |
def |
double |
- |
double |
double |
double |
double |
double |
double |
double |
- |
def |
Reference |
- |
- |
- |
- |
- |
- |
- |
- |
Object |
def |
def |
def |
def |
def |
def |
def |
def |
def |
def |
def |
def |
Examples
-
Equality equals with the
boolean
type.boolean a = true; (1) boolean b = false; (2) a = a == false; (3) b = a == b; (4)
-
declare
boolean a
; storeboolean true
toa
-
declare
boolean b
; storeboolean false
tob
-
load from
a
→boolean true
; equality equalsboolean true
andboolean false
→boolean false
; storeboolean false
toa
-
load from
a
→boolean false @0
; load fromb
→boolean false @1
; equality equalsboolean false @0
andboolean false @1
→boolean false
; storeboolean false
tob
-
-
Equality equals with primitive types.
int a = 1; (1) double b = 2.0; (2) boolean c = a == b; (3) c = 1 == a; (4)
-
declare
int a
; storeint 1
toa
-
declare
double b
; storedouble 1.0
tob
-
declare
boolean c
; load froma
→int 1
; load fromb
→double 2.0
; promoteint 1
anddouble 2.0
: resultdouble
; implicit castint 1
todouble 1.0
→double `1.0
; equality equalsdouble 1.0
anddouble 2.0
→boolean false
; storeboolean false
toc
-
load from
a
→int 1 @1
; equality equalsint 1 @0
andint 1 @1
→boolean true
; storeboolean true
toc
-
-
Equal equals with reference types.
List a = new ArrayList(); (1) List b = new ArrayList(); (2) a.add(1); (3) boolean c = a == b; (4) b.add(1); (5) c = a == b; (6)
-
declare
List a
; allocateArrayList
instance →ArrayList reference
; implicit castArrayList reference
toList reference
→List reference
; storeList reference
toa
-
declare
List b
; allocateArrayList
instance →ArrayList reference
; implicit castArrayList reference
toList reference
→List reference
; storeList reference
tob
-
load from
a
→List reference
; calladd
onList reference
with arguments (int 1)
-
declare
boolean c
; load froma
→List reference @0
; load fromb
→List reference @1
; callequals
onList reference @0
with arguments (List reference @1
) →boolean false
; storeboolean false
toc
-
load from
b
→List reference
; calladd
onList reference
with arguments (int 1
) -
load from
a
→List reference @0
; load fromb
→List reference @1
; callequals
onList reference @0
with arguments (List reference @1
) →boolean true
; storeboolean true
toc
-
-
Equality equals with
null
.Object a = null; (1) Object b = null; (2) boolean c = a == null; (3) c = a == b; (4) b = new Object(); (5) c = a == b; (6)
-
declare
Object a
; storenull
toa
-
declare
Object b
; storenull
tob
-
declare
boolean c
; load froma
→null @0
; equality equalsnull @0
andnull @1
→boolean true
; storeboolean true
toc
-
load from
a
→null @0
; load fromb
→null @1
; equality equalsnull @0
andnull @1
→boolean true
; storeboolean true
toc
-
allocate
Object
instance →Object reference
; storeObject reference
tob
-
load from
a
→Object reference
; load fromb
→null
; callequals
onObject reference
with arguments (null
) →boolean false
; storeboolean false
toc
-
-
Equality equals with the
def
type.def a = 0; (1) def b = 1; (2) boolean c = a == b; (3) def d = new HashMap(); (4) def e = new ArrayList(); (5) c = d == e; (6)
-
declare
def a
; implicit castint 0
todef
→def
; storedef
toa
; -
declare
def b
; implicit castint 1
todef
→def
; storedef
tob
; -
declare
boolean c
; load froma
→def
; implicit casta
toint 0
→int 0
; load fromb
→def
; implicit castb
toint 1
→int 1
; equality equalsint 0
andint 1
→boolean false
; storeboolean false
toc
-
declare
def d
; allocateHashMap
instance →HashMap reference
; implicit castHashMap reference
todef
→def
storedef
tod
; -
declare
def e
; allocateArrayList
instance →ArrayList reference
; implicit castArrayList reference
todef
→def
storedef
tod
; -
load from
d
→def
; implicit castdef
toHashMap reference
→HashMap reference
; load frome
→def
; implicit castdef
toArrayList reference
→ArrayList reference
; callequals
onHashMap reference
with arguments (ArrayList reference
) →boolean false
; storeboolean false
toc
-
Equality Not Equals
Use the equality not equals operator '!='
to COMPARE two values where a
resultant boolean
type value is true
if the two values are NOT equal and
false
otherwise. The member method, equals
, is implicitly called when the
values are reference type values where the first value is the target of the call
and the second value is the argument with the resultant boolean
type value
flipped. This operation is null-safe
where if both values are null
the
resultant boolean
type value is false
, and if only one value is null
the
resultant boolean
type value is true
. A valid comparison is between boolean
type values, numeric type values, or reference type values.
Errors
-
If a comparison is made between a
boolean
type value and numeric type value. -
If a comparison is made between a primitive type value and a reference type value.
Grammar
equality_not_equals: expression '!=' expression;
Promotion
boolean |
byte |
short |
char |
int |
long |
float |
double |
Reference |
def |
|
boolean |
boolean |
- |
- |
- |
- |
- |
- |
- |
- |
def |
byte |
- |
int |
int |
int |
int |
long |
float |
double |
- |
def |
short |
- |
int |
int |
int |
int |
long |
float |
double |
- |
def |
char |
- |
int |
int |
int |
int |
long |
float |
double |
- |
def |
int |
- |
int |
int |
int |
int |
long |
float |
double |
- |
def |
long |
- |
long |
long |
long |
long |
long |
float |
double |
- |
def |
float |
- |
float |
float |
float |
float |
float |
float |
double |
- |
def |
double |
- |
double |
double |
double |
double |
double |
double |
double |
- |
def |
Reference |
- |
- |
- |
- |
- |
- |
- |
- |
Object |
def |
def |
def |
def |
def |
def |
def |
def |
def |
def |
def |
def |
Examples
-
Equality not equals with the
boolean
type.boolean a = true; (1) boolean b = false; (2) a = a != false; (3) b = a != b; (4)
-
declare
boolean a
; storeboolean true
toa
-
declare
boolean b
; storeboolean false
tob
-
load from
a
→boolean true
; equality not equalsboolean true
andboolean false
→boolean true
; storeboolean true
toa
-
load from
a
→boolean true
; load fromb
→boolean false
; equality not equalsboolean true
andboolean false
→boolean true
; storeboolean true
tob
-
-
Equality not equals with primitive types.
int a = 1; (1) double b = 2.0; (2) boolean c = a != b; (3) c = 1 != a; (4)
-
declare
int a
; storeint 1
toa
-
declare
double b
; storedouble 1.0
tob
-
declare
boolean c
; load froma
→int 1
; load fromb
→double 2.0
; promoteint 1
anddouble 2.0
: resultdouble
; implicit castint 1
todouble 1.0
→double `1.0
; equality not equalsdouble 1.0
anddouble 2.0
→boolean true
; storeboolean true
toc
-
load from
a
→int 1 @1
; equality not equalsint 1 @0
andint 1 @1
→boolean false
; storeboolean false
toc
-
-
Equality not equals with reference types.
List a = new ArrayList(); (1) List b = new ArrayList(); (2) a.add(1); (3) boolean c = a == b; (4) b.add(1); (5) c = a == b; (6)
-
declare
List a
; allocateArrayList
instance →ArrayList reference
; implicit castArrayList reference
toList reference
→List reference
; storeList reference
toa
-
declare
List b
; allocateArrayList
instance →ArrayList reference
; implicit castArrayList reference
toList reference
→List reference
; storeList reference
tob
-
load from
a
→List reference
; calladd
onList reference
with arguments (int 1)
-
declare
boolean c
; load froma
→List reference @0
; load fromb
→List reference @1
; callequals
onList reference @0
with arguments (List reference @1
) →boolean false
; boolean notboolean false
→boolean true
storeboolean true
toc
-
load from
b
→List reference
; calladd
onList reference
with arguments (int 1
) -
load from
a
→List reference @0
; load fromb
→List reference @1
; callequals
onList reference @0
with arguments (List reference @1
) →boolean true
; boolean notboolean true
→boolean false
; storeboolean false
toc
-
-
Equality not equals with
null
.Object a = null; (1) Object b = null; (2) boolean c = a == null; (3) c = a == b; (4) b = new Object(); (5) c = a == b; (6)
-
declare
Object a
; storenull
toa
-
declare
Object b
; storenull
tob
-
declare
boolean c
; load froma
→null @0
; equality not equalsnull @0
andnull @1
→boolean false
; storeboolean false
toc
-
load from
a
→null @0
; load fromb
→null @1
; equality not equalsnull @0
andnull @1
→boolean false
; storeboolean false
toc
-
allocate
Object
instance →Object reference
; storeObject reference
tob
-
load from
a
→Object reference
; load fromb
→null
; callequals
onObject reference
with arguments (null
) →boolean false
; boolean notboolean false
→boolean true
; storeboolean true
toc
-
-
Equality not equals with the
def
type.def a = 0; (1) def b = 1; (2) boolean c = a == b; (3) def d = new HashMap(); (4) def e = new ArrayList(); (5) c = d == e; (6)
-
declare
def a
; implicit castint 0
todef
→def
; storedef
toa
; -
declare
def b
; implicit castint 1
todef
→def
; storedef
tob
; -
declare
boolean c
; load froma
→def
; implicit casta
toint 0
→int 0
; load fromb
→def
; implicit castb
toint 1
→int 1
; equality equalsint 0
andint 1
→boolean false
; storeboolean false
toc
-
declare
def d
; allocateHashMap
instance →HashMap reference
; implicit castHashMap reference
todef
→def
storedef
tod
; -
declare
def e
; allocateArrayList
instance →ArrayList reference
; implicit castArrayList reference
todef
→def
storedef
tod
; -
load from
d
→def
; implicit castdef
toHashMap reference
→HashMap reference
; load frome
→def
; implicit castdef
toArrayList reference
→ArrayList reference
; callequals
onHashMap reference
with arguments (ArrayList reference
) →boolean false
; storeboolean false
toc
-
Identity Equals
Use the identity equals operator '==='
to COMPARE two values where a resultant
boolean
type value is true
if the two values are equal and false
otherwise. A reference type value is equal to another reference type value if
both values refer to same instance on the heap or if both values are null
. A
valid comparison is between boolean
type values, numeric type values, or
reference type values.
Errors
-
If a comparison is made between a
boolean
type value and numeric type value. -
If a comparison is made between a primitive type value and a reference type value.
Grammar
identity_equals: expression '===' expression;
Promotion
boolean |
byte |
short |
char |
int |
long |
float |
double |
Reference |
def |
|
boolean |
boolean |
- |
- |
- |
- |
- |
- |
- |
- |
def |
byte |
- |
int |
int |
int |
int |
long |
float |
double |
- |
def |
short |
- |
int |
int |
int |
int |
long |
float |
double |
- |
def |
char |
- |
int |
int |
int |
int |
long |
float |
double |
- |
def |
int |
- |
int |
int |
int |
int |
long |
float |
double |
- |
def |
long |
- |
long |
long |
long |
long |
long |
float |
double |
- |
def |
float |
- |
float |
float |
float |
float |
float |
float |
double |
- |
def |
double |
- |
double |
double |
double |
double |
double |
double |
double |
- |
def |
Reference |
- |
- |
- |
- |
- |
- |
- |
- |
Object |
def |
def |
def |
def |
def |
def |
def |
def |
def |
def |
def |
def |
Examples
-
Identity equals with reference types.
List a = new ArrayList(); (1) List b = new ArrayList(); (2) List c = a; (3) boolean c = a === b; (4) c = a === c; (5)
-
declare
List a
; allocateArrayList
instance →ArrayList reference
; implicit castArrayList reference
toList reference
→List reference
; storeList reference
toa
-
declare
List b
; allocateArrayList
instance →ArrayList reference
; implicit castArrayList reference
toList reference
→List reference
; storeList reference
tob
-
load from
a
→List reference
; storeList reference
toc
-
declare
boolean c
; load froma
→List reference @0
; load fromb
→List reference @1
; identity equalsList reference @0
andList reference @1
→boolean false
storeboolean false
toc
-
load from
a
→List reference @0
; load fromc
→List reference @1
; identity equalsList reference @0
andList reference @1
→boolean true
storeboolean true
toc
(noteList reference @0
andList reference @1
refer to the same instance)
-
-
Identity equals with
null
.Object a = null; (1) Object b = null; (2) boolean c = a === null; (3) c = a === b; (4) b = new Object(); (5) c = a === b; (6)
-
declare
Object a
; storenull
toa
-
declare
Object b
; storenull
tob
-
declare
boolean c
; load froma
→null @0
; identity equalsnull @0
andnull @1
→boolean true
; storeboolean true
toc
-
load from
a
→null @0
; load fromb
→null @1
; identity equalsnull @0
andnull @1
→boolean true
; storeboolean true
toc
-
allocate
Object
instance →Object reference
; storeObject reference
tob
-
load from
a
→Object reference
; load fromb
→null
; identity equalsObject reference
andnull
→boolean false
; storeboolean false
toc
-
-
Identity equals with the
def
type.def a = new HashMap(); (1) def b = new ArrayList(); (2) boolean c = a === b; (3) b = a; (4) c = a === b; (5)
-
declare
def d
; allocateHashMap
instance →HashMap reference
; implicit castHashMap reference
todef
→def
storedef
tod
-
declare
def e
; allocateArrayList
instance →ArrayList reference
; implicit castArrayList reference
todef
→def
storedef
tod
-
declare
boolean c
; load froma
→def
; implicit castdef
toHashMap reference
→HashMap reference
; load fromb
→def
; implicit castdef
toArrayList reference
→ArrayList reference
; identity equalsHashMap reference
andArrayList reference
→boolean false
; storeboolean false
toc
-
load from
a
→def
; storedef
tob
-
load from
a
→def
; implicit castdef
toHashMap reference @0
→HashMap reference @0
; load fromb
→def
; implicit castdef
toHashMap reference @1
→HashMap reference @1
; identity equalsHashMap reference @0
andHashMap reference @1
→boolean true
; storeboolean true
tob
; (noteHashMap reference @0
andHashMap reference @1
refer to the same instance)
-
Identity Not Equals
Use the identity not equals operator '!=='
to COMPARE two values where a
resultant boolean
type value is true
if the two values are NOT equal and
false
otherwise. A reference type value is not equal to another reference type
value if both values refer to different instances on the heap or if one value is
null
and the other is not. A valid comparison is between boolean
type
values, numeric type values, or reference type values.
Errors
-
If a comparison is made between a
boolean
type value and numeric type value. -
If a comparison is made between a primitive type value and a reference type value.
Grammar
identity_not_equals: expression '!==' expression;
Promotion
boolean |
byte |
short |
char |
int |
long |
float |
double |
Reference |
def |
|
boolean |
boolean |
- |
- |
- |
- |
- |
- |
- |
- |
def |
byte |
- |
int |
int |
int |
int |
long |
float |
double |
- |
def |
short |
- |
int |
int |
int |
int |
long |
float |
double |
- |
def |
char |
- |
int |
int |
int |
int |
long |
float |
double |
- |
def |
int |
- |
int |
int |
int |
int |
long |
float |
double |
- |
def |
long |
- |
long |
long |
long |
long |
long |
float |
double |
- |
def |
float |
- |
float |
float |
float |
float |
float |
float |
double |
- |
def |
double |
- |
double |
double |
double |
double |
double |
double |
double |
- |
def |
Reference |
- |
- |
- |
- |
- |
- |
- |
- |
Object |
def |
def |
def |
def |
def |
def |
def |
def |
def |
def |
def |
def |
Examples
-
Identity not equals with reference type values.
List a = new ArrayList(); (1) List b = new ArrayList(); (2) List c = a; (3) boolean c = a !== b; (4) c = a !== c; (5)
-
declare
List a
; allocateArrayList
instance →ArrayList reference
; implicit castArrayList reference
toList reference
→List reference
; storeList reference
toa
-
declare
List b
; allocateArrayList
instance →ArrayList reference
; implicit castArrayList reference
toList reference
→List reference
; storeList reference
tob
-
load from
a
→List reference
; storeList reference
toc
-
declare
boolean c
; load froma
→List reference @0
; load fromb
→List reference @1
; identity not equalsList reference @0
andList reference @1
→boolean true
storeboolean true
toc
-
load from
a
→List reference @0
; load fromc
→List reference @1
; identity not equalsList reference @0
andList reference @1
→boolean false
storeboolean false
toc
(noteList reference @0
andList reference @1
refer to the same instance)
-
-
Identity not equals with
null
.Object a = null; (1) Object b = null; (2) boolean c = a !== null; (3) c = a !== b; (4) b = new Object(); (5) c = a !== b; (6)
-
declare
Object a
; storenull
toa
-
declare
Object b
; storenull
tob
-
declare
boolean c
; load froma
→null @0
; identity not equalsnull @0
andnull @1
→boolean false
; storeboolean false
toc
-
load from
a
→null @0
; load fromb
→null @1
; identity not equalsnull @0
andnull @1
→boolean false
; storeboolean false
toc
-
allocate
Object
instance →Object reference
; storeObject reference
tob
-
load from
a
→Object reference
; load fromb
→null
; identity not equalsObject reference
andnull
→boolean true
; storeboolean true
toc
-
-
Identity not equals with the
def
type.def a = new HashMap(); (1) def b = new ArrayList(); (2) boolean c = a !== b; (3) b = a; (4) c = a !== b; (5)
-
declare
def d
; allocateHashMap
instance →HashMap reference
; implicit castHashMap reference
todef
→def
storedef
tod
-
declare
def e
; allocateArrayList
instance →ArrayList reference
; implicit castArrayList reference
todef
→def
storedef
tod
-
declare
boolean c
; load froma
→def
; implicit castdef
toHashMap reference
→HashMap reference
; load fromb
→def
; implicit castdef
toArrayList reference
→ArrayList reference
; identity not equalsHashMap reference
andArrayList reference
→boolean true
; storeboolean true
toc
-
load from
a
→def
; storedef
tob
-
load from
a
→def
; implicit castdef
toHashMap reference @0
→HashMap reference @0
; load fromb
→def
; implicit castdef
toHashMap reference @1
→HashMap reference @1
; identity not equalsHashMap reference @0
andHashMap reference @1
→boolean false
; storeboolean false
tob
; (noteHashMap reference @0
andHashMap reference @1
refer to the same instance)
-
Boolean Xor
Use the boolean xor operator '^'
to XOR together two boolean
type values
where if one boolean
type value is true
and the other is false
the
resultant boolean
type value is true
and false
otherwise.
Errors
-
If either evaluated value is a value other than a
boolean
type value or a value that is castable to aboolean
type value.
Truth
true |
false |
|
true |
false |
true |
false |
true |
false |
Grammar
boolean_xor: expression '^' expression;
Examples
-
Boolean xor with the
boolean
type.boolean x = false; (1) boolean y = x ^ true; (2) y = y ^ x; (3)
-
declare
boolean x
; storeboolean false
tox
-
declare
boolean y
; load fromx
→boolean false
boolean xorboolean false
andboolean true
→boolean true
; storeboolean true
toy
-
load from
y
→boolean true @0
; load fromx
→boolean true @1
; boolean xorboolean true @0
andboolean true @1
→boolean false
; storeboolean false
toy
-
-
Boolean xor with the
def
type.def x = false; (1) def y = x ^ true; (2) y = y ^ x; (3)
-
declare
def x
; implicit castboolean false
todef
→def
; storedef
tox
-
declare
def y
; load fromx
→def
; implicit castdef
toboolean false
→boolean false
; boolean xorboolean false
andboolean true
→boolean true
; implicit castboolean true
todef
→def
; storedef
toy
-
load from
y
→def
; implicit castdef
toboolean true @0
→boolean true @0
; load fromx
→def
; implicit castdef
toboolean true @1
→boolean true @1
; boolean xorboolean true @0
andboolean true @1
→boolean false
; implicit castboolean false
→def
; storedef
toy
-
Boolean And
Use the boolean and operator '&&'
to AND together two boolean
type values
where if both boolean
type values are true
the resultant boolean
type
value is true
and false
otherwise.
Errors
-
If either evaluated value is a value other than a
boolean
type value or a value that is castable to aboolean
type value.
Truth
true |
false |
|
true |
true |
false |
false |
false |
false |
Grammar
boolean_and: expression '&&' expression;
Examples
-
Boolean and with the
boolean
type.boolean x = true; (1) boolean y = x && true; (2) x = false; (3) y = y && x; (4)
-
declare
boolean x
; storeboolean true
tox
-
declare
boolean y
; load fromx
→boolean true @0
; boolean andboolean true @0
andboolean true @1
→boolean true
; storeboolean true
toy
-
store
boolean false
tox
-
load from
y
→boolean true
; load fromx
→boolean false
; boolean andboolean true
andboolean false
→boolean false
; storeboolean false
toy
-
-
Boolean and with the
def
type.def x = true; (1) def y = x && true; (2) x = false; (3) y = y && x; (4)
-
declare
def x
; implicit castboolean true
todef
→def
; storedef
tox
-
declare
def y
; load fromx
→def
; implicit castdef
toboolean true @0
→boolean true @0
; boolean andboolean true @0
andboolean true @1
→boolean true
; implicit castboolean true
todef
→def
; storedef
toy
-
implicit cast
boolean false
todef
→def
; storedef
tox
; -
load from
y
→def
; implicit castdef
toboolean true
→boolean true
; load fromx
→def
; implicit castdef
toboolean false
→boolean false
; boolean andboolean true
andboolean false
→boolean false
; implicit castboolean false
→def
; storedef
toy
-
Boolean Or
Use the boolean or operator '||'
to OR together two boolean
type values
where if either one of the boolean
type values is true
the resultant
boolean
type value is true
and false
otherwise.
Errors
-
If either evaluated value is a value other than a
boolean
type value or a value that is castable to aboolean
type value.
Truth
true |
false |
|
true |
true |
true |
false |
true |
false |
Grammar:
boolean_and: expression '||' expression;
Examples
-
Boolean or with the
boolean
type.boolean x = false; (1) boolean y = x || true; (2) y = false; (3) y = y || x; (4)
-
declare
boolean x
; storeboolean false
tox
-
declare
boolean y
; load fromx
→boolean false
; boolean orboolean false
andboolean true
→boolean true
; storeboolean true
toy
-
store
boolean false
toy
-
load from
y
→boolean false @0
; load fromx
→boolean false @1
; boolean orboolean false @0
andboolean false @1
→boolean false
; storeboolean false
toy
-
-
Boolean or with the
def
type.def x = false; (1) def y = x || true; (2) y = false; (3) y = y || x; (4)
-
declare
def x
; implicit castboolean false
todef
→def
; storedef
tox
-
declare
def y
; load fromx
→def
; implicit castdef
toboolean false
→boolean true
; boolean orboolean false
andboolean true
→boolean true
; implicit castboolean true
todef
→def
; storedef
toy
-
implicit cast
boolean false
todef
→def
; storedef
toy
; -
load from
y
→def
; implicit castdef
toboolean false @0
→boolean false @0
; load fromx
→def
; implicit castdef
toboolean false @1
→boolean false @1
; boolean orboolean false @0
andboolean false @1
→boolean false
; implicit castboolean false
→def
; storedef
toy
-
Operators: Reference
Method Call
Use the method call operator '()'
to call a member method on a
reference type value. Implicit
boxing/unboxing is evaluated as necessary per argument
during the method call. When a method call is made on a target def
type value,
the parameters and return type value are considered to also be of the def
type
and are evaluated at run-time.
An overloaded method is one that shares the same name with two or more methods. A method is overloaded based on arity where the same name is re-used for multiple methods as long as the number of parameters differs.
Errors
-
If the reference type value is
null
. -
If the member method name doesn’t exist for a given reference type value.
-
If the number of arguments passed in is different from the number of specified parameters.
-
If the arguments cannot be implicitly cast or implicitly boxed/unboxed to the correct type values for the parameters.
Grammar
method_call: '.' ID arguments;
arguments: '(' (expression (',' expression)*)? ')';
Examples
-
Method calls on different reference types.
Map m = new HashMap(); (1) m.put(1, 2); (2) int z = m.get(1); (3) def d = new ArrayList(); (4) d.add(1); (5) int i = Integer.parseInt(d.get(0).toString()); (6)
-
declare
Map m
; allocateHashMap
instance →HashMap reference
; storeHashMap reference
tom
-
load from
m
→Map reference
; implicit castint 1
todef
→def
; implicit castint 2
todef
→def
; callput
onMap reference
with arguments (int 1
,int 2
) -
declare
int z
; load fromm
→Map reference
; callget
onMap reference
with arguments (int 1
) →def
; implicit castdef
toint 2
→int 2
; storeint 2
toz
-
declare
def d
; allocateArrayList
instance →ArrayList reference
; implicit castArrayList
todef
→def
; storedef
tod
-
load from
d
→def
; implicit castdef
toArrayList reference
→ArrayList reference
calladd
onArrayList reference
with arguments (int 1
); -
declare
int i
; load fromd
→def
; implicit castdef
toArrayList reference
→ArrayList reference
callget
onArrayList reference
with arguments (int 1
) →def
; implicit castdef
toInteger 1 reference
→Integer 1 reference
; calltoString
onInteger 1 reference
→String '1'
; callparseInt
onInteger
with arguments (String '1'
) →int 1
; storeint 1
ini
;
-
Field Access
Use the field access operator '.'
to store a value to or load a value from a
reference type member field.
Errors
-
If the reference type value is
null
. -
If the member field name doesn’t exist for a given reference type value.
Grammar
field_access: '.' ID;
Examples
The examples use the following reference type definition:
name:
Example
non-static member fields:
* int x
* def y
* List z
-
Field access with the
Example
type.Example example = new Example(); (1) example.x = 1; (2) example.y = example.x; (3) example.z = new ArrayList(); (4) example.z.add(1); (5) example.x = example.z.get(0); (6)
-
declare
Example example
; allocateExample
instance →Example reference
; storeExample reference
toexample
-
load from
example
→Example reference
; storeint 1
tox
ofExample reference
-
load from
example
→Example reference @0
; load fromexample
→Example reference @1
; load fromx
ofExample reference @1
→int 1
; implicit castint 1
todef
→def
; storedef
toy
ofExample reference @0
; (noteExample reference @0
andExample reference @1
are the same) -
load from
example
→Example reference
; allocateArrayList
instance →ArrayList reference
; implicit castArrayList reference
toList reference
→List reference
; storeList reference
toz
ofExample reference
-
load from
example
→Example reference
; load fromz
ofExample reference
→List reference
; calladd
onList reference
with arguments (int 1
) -
load from
example
→Example reference @0
; load fromexample
→Example reference @1
; load fromz
ofExample reference @1
→List reference
; callget
onList reference
with arguments (int 0
) →int 1
; storeint 1
inx
ofList reference @0
; (noteExample reference @0
andExample reference @1
are the same)
-
Null Safe
Use the null safe operator '?.'
instead of the method call operator or field
access operator to ensure a reference type value is non-null
before
a method call or field access. A null
value will be returned if the reference
type value is null
, otherwise the method call or field access is evaluated.
Errors
-
If the method call return type value or the field access type value is not a reference type value and is not implicitly castable to a reference type value.
Grammar
null_safe: null_safe_method_call
| null_safe_field_access
;
null_safe_method_call: '?.' ID arguments;
arguments: '(' (expression (',' expression)*)? ')';
null_safe_field_access: '?.' ID;
Examples
The examples use the following reference type definition:
name:
Example
non-static member methods:
* List factory()
non-static member fields:
* List x
-
Null safe without a
null
value.Example example = new Example(); (1) List x = example?.factory(); (2)
-
declare
Example example
; allocateExample
instance →Example reference
; storeExample reference
toexample
-
declare
List x
; load fromexample
→Example reference
; null safe callfactory
onExample reference
→List reference
; storeList reference
tox
;
-
-
Null safe with a
null
value;Example example = null; (1) List x = example?.x; (2)
-
declare
Example example
; storenull
toexample
-
declare
List x
; load fromexample
→Example reference
; null safe accessx
onExample reference
→null
; storenull
tox
; (note the null safe operator returnednull
becauseexample
isnull
)
-
List Initialization
Use the list initialization operator '[]'
to allocate an List
type instance
to the heap with a set of pre-defined values. Each value used to initialize the
List
type instance is cast to a def
type value upon insertion into the
List
type instance using the add
method. The order of the specified values
is maintained.
Grammar
list_initialization: '[' expression (',' expression)* ']'
| '[' ']';
Examples
-
List initialization of an empty
List
type value.List empty = []; (1)
-
declare
List empty
; allocateArrayList
instance →ArrayList reference
; implicit castArrayList reference
toList reference
→List reference
; storeList reference
toempty
-
-
List initialization with static values.
List list = [1, 2, 3]; (1)
-
declare
List list
; allocateArrayList
instance →ArrayList reference
; calladd
onArrayList reference
with arguments(int 1
); calladd
onArrayList reference
with arguments(int 2
); calladd
onArrayList reference
with arguments(int 3
); implicit castArrayList reference
toList reference
→List reference
; storeList reference
tolist
-
-
List initialization with non-static values.
int i = 1; (1) long l = 2L; (2) float f = 3.0F; (3) double d = 4.0; (4) String s = "5"; (5) List list = [i, l, f*d, s]; (6)
-
declare
int i
; storeint 1
toi
-
declare
long l
; storelong 2
tol
-
declare
float f
; storefloat 3.0
tof
-
declare
double d
; storedouble 4.0
tod
-
declare
String s
; storeString "5"
tos
-
declare
List list
; allocateArrayList
instance →ArrayList reference
; load fromi
→int 1
; calladd
onArrayList reference
with arguments(int 1
); load froml
→long 2
; calladd
onArrayList reference
with arguments(long 2
); load fromf
→float 3.0
; load fromd
→double 4.0
; promotefloat 3.0
anddouble 4.0
: resultdouble
; implicit castfloat 3.0
todouble 3.0
→double 3.0
; multiplydouble 3.0
anddouble 4.0
→double 12.0
; calladd
onArrayList reference
with arguments(double 12.0
); load froms
→String "5"
; calladd
onArrayList reference
with arguments(String "5"
); implicit castArrayList reference
toList reference
→List reference
; storeList reference
tolist
-
List Access
Use the list access operator '[]'
as a shortcut for a set
method call or
get
method call made on a List
type value.
Errors
-
If a value other than a
List
type value is accessed. -
If a non-integer type value is used as an index for a
set
method call orget
method call.
Grammar
list_access: '[' expression ']'
Examples
-
List access with the
List
type.List list = new ArrayList(); (1) list.add(1); (2) list.add(2); (3) list.add(3); (4) list[0] = 2; (5) list[1] = 5; (6) int x = list[0] + list[1]; (7) int y = 1; (8) int z = list[y]; (9)
-
declare
List list
; allocateArrayList
instance →ArrayList reference
; implicit castArrayList reference
toList reference
→List reference
; storeList reference
tolist
-
load from
list
→List reference
; calladd
onList reference
with arguments(int 1
) -
load from
list
→List reference
; calladd
onList reference
with arguments(int 2
) -
load from
list
→List reference
; calladd
onList reference
with arguments(int 3
) -
load from
list
→List reference
; callset
onList reference
with arguments(int 0
,int 2
) -
load from
list
→List reference
; callset
onList reference
with arguments(int 1
,int 5
) -
declare
int x
; load fromlist
→List reference
; callget
onList reference
with arguments(int 0
) →def
; implicit castdef
toint 2
→int 2
; load fromlist
→List reference
; callget
onList reference
with arguments(int 1
) →def
; implicit castdef
toint 5
→int 5
; addint 2
andint 5
→int 7
; storeint 7
tox
-
declare
int y
; storeint 1
inty
-
declare
int z
; load fromlist
→List reference
; load fromy
→int 1
; callget
onList reference
with arguments(int 1
) →def
; implicit castdef
toint 5
→int 5
; storeint 5
toz
-
-
List access with the
def
type.def d = new ArrayList(); (1) d.add(1); (2) d.add(2); (3) d.add(3); (4) d[0] = 2; (5) d[1] = 5; (6) def x = d[0] + d[1]; (7) def y = 1; (8) def z = d[y]; (9)
-
declare
List d
; allocateArrayList
instance →ArrayList reference
; implicit castArrayList reference
todef
→def
; storedef
tod
-
load from
d
→def
; implicit castdef
toArrayList reference
→ArrayList reference
; calladd
onArrayList reference
with arguments(int 1
) -
load from
d
→def
; implicit castdef
toArrayList reference
→ArrayList reference
; calladd
onArrayList reference
with arguments(int 2
) -
load from
d
→def
; implicit castdef
toArrayList reference
→ArrayList reference
; calladd
onArrayList reference
with arguments(int 3
) -
load from
d
→def
; implicit castdef
toArrayList reference
→ArrayList reference
; callset
onArrayList reference
with arguments(int 0
,int 2
) -
load from
d
→def
; implicit castdef
toArrayList reference
→ArrayList reference
; callset
onArrayList reference
with arguments(int 1
,int 5
) -
declare
def x
; load fromd
→def
; implicit castdef
toArrayList reference
→ArrayList reference
; callget
onArrayList reference
with arguments(int 0
) →def
; implicit castdef
toint 2
→int 2
; load fromd
→def
; implicit castdef
toArrayList reference
→ArrayList reference
; callget
onArrayList reference
with arguments(int 1
) →def
; implicit castdef
toint 2
→int 2
; addint 2
andint 5
→int 7
; storeint 7
tox
-
declare
int y
; storeint 1
inty
-
declare
int z
; load fromd
→ArrayList reference
; load fromy
→def
; implicit castdef
toint 1
→int 1
; callget
onArrayList reference
with arguments(int 1
) →def
; storedef
toz
-
Map Initialization
Use the map initialization operator '[:]'
to allocate a Map
type instance to
the heap with a set of pre-defined values. Each pair of values used to
initialize the Map
type instance are cast to def
type values upon insertion
into the Map
type instance using the put
method.
Grammar
map_initialization: '[' key_pair (',' key_pair)* ']'
| '[' ':' ']';
key_pair: expression ':' expression
Examples
-
Map initialization of an empty
Map
type value.Map empty = [:]; (1)
-
declare
Map empty
; allocateHashMap
instance →HashMap reference
; implicit castHashMap reference
toMap reference
→Map reference
; storeMap reference
toempty
-
-
Map initialization with static values.
Map map = [1:2, 3:4, 5:6]; (1)
-
declare
Map map
; allocateHashMap
instance →HashMap reference
; callput
onHashMap reference
with arguments(int 1
,int 2
); callput
onHashMap reference
with arguments(int 3
,int 4
); callput
onHashMap reference
with arguments(int 5
,int 6
); implicit castHashMap reference
toMap reference
→Map reference
; storeMap reference
tomap
-
-
Map initialization with non-static values.
byte b = 0; (1) int i = 1; (2) long l = 2L; (3) float f = 3.0F; (4) double d = 4.0; (5) String s = "5"; (6) Map map = [b:i, l:f*d, d:s]; (7)
-
declare
byte b
; storebyte 0
tob
-
declare
int i
; storeint 1
toi
-
declare
long l
; storelong 2
tol
-
declare
float f
; storefloat 3.0
tof
-
declare
double d
; storedouble 4.0
tod
-
declare
String s
; storeString "5"
tos
-
declare
Map map
; allocateHashMap
instance →HashMap reference
; load fromb
→byte 0
; load fromi
→int 1
; callput
onHashMap reference
with arguments(byte 0
,int 1
); load froml
→long 2
; load fromf
→float 3.0
; load fromd
→double 4.0
; promotefloat 3.0
anddouble 4.0
: resultdouble
; implicit castfloat 3.0
todouble 3.0
→double 3.0
; multiplydouble 3.0
anddouble 4.0
→double 12.0
; callput
onHashMap reference
with arguments(long 2
,double 12.0
); load fromd
→double 4.0
; load froms
→String "5"
; callput
onHashMap reference
with arguments(double 4.0
,String "5"
); implicit castHashMap reference
toMap reference
→Map reference
; storeMap reference
tomap
-
Map Access
Use the map access operator '[]'
as a shortcut for a put
method call or
get
method call made on a Map
type value.
Errors
-
If a value other than a
Map
type value is accessed.
Grammar
map_access: '[' expression ']'
Examples
-
Map access with the
Map
type.Map map = new HashMap(); (1) map['value2'] = 2; (2) map['value5'] = 5; (3) int x = map['value2'] + map['value5']; (4) String y = 'value5'; (5) int z = x[z]; (6)
-
declare
Map map
; allocateHashMap
instance →HashMap reference
; implicit castHashMap reference
toMap reference
→Map reference
; storeMap reference
tomap
-
load from
map
→Map reference
; callput
onMap reference
with arguments(String 'value2'
,int 2
) -
load from
map
→Map reference
; callput
onMap reference
with arguments(String 'value5'
,int 5
) -
declare
int x
; load frommap
→Map reference
; callget
onMap reference
with arguments(String 'value2'
) →def
; implicit castdef
toint 2
→int 2
; load frommap
→Map reference
; callget
onMap reference
with arguments(String 'value5'
) →def
; implicit castdef
toint 5
→int 5
; addint 2
andint 5
→int 7
; storeint 7
tox
-
declare
String y
; storeString 'value5'
toy
-
declare
int z
; load frommap
→Map reference
; load fromy
→String 'value5'
; callget
onMap reference
with arguments(String 'value5'
) →def
; implicit castdef
toint 5
→int 5
; storeint 5
toz
-
-
Map access with the
def
type.def d = new HashMap(); (1) d['value2'] = 2; (2) d['value5'] = 5; (3) int x = d['value2'] + d['value5']; (4) String y = 'value5'; (5) def z = d[y]; (6)
-
declare
def d
; allocateHashMap
instance →HashMap reference
; implicit castHashMap reference
todef
→def
; storedef
tod
-
load from
d
→def
; implicit castdef
toHashMap reference
→HashMap reference
; callput
onHashMap reference
with arguments(String 'value2'
,int 2
) -
load from
d
→def
; implicit castdef
toHashMap reference
→HashMap reference
; callput
onHashMap reference
with arguments(String 'value5'
,int 5
) -
declare
int x
; load fromd
→def
; implicit castdef
toHashMap reference
→HashMap reference
; callget
onHashMap reference
with arguments(String 'value2'
) →def
; implicit castdef
toint 2
→int 2
; load fromd
→def
; callget
onHashMap reference
with arguments(String 'value5'
) →def
; implicit castdef
toint 5
→int 5
; addint 2
andint 5
→int 7
; storeint 7
tox
-
declare
String y
; storeString 'value5'
toy
-
declare
def z
; load fromd
→def
; load fromy
→String 'value5'
; callget
onHashMap reference
with arguments(String 'value5'
) →def
; storedef
toz
-
New Instance
Use the new instance operator 'new ()'
to allocate a
reference type instance to the heap and call a specified
constructor. Implicit boxing/unboxing is evaluated as
necessary per argument during the constructor call.
An overloaded constructor is one that shares the same name with two or more constructors. A constructor is overloaded based on arity where the same reference type name is re-used for multiple constructors as long as the number of parameters differs.
Errors
-
If the reference type name doesn’t exist for instance allocation.
-
If the number of arguments passed in is different from the number of specified parameters.
-
If the arguments cannot be implicitly cast or implicitly boxed/unboxed to the correct type values for the parameters.
Grammar
new_instance: 'new' TYPE '(' (expression (',' expression)*)? ')';
Examples
-
Allocation of new instances with different types.
Map m = new HashMap(); (1)
def d = new ArrayList(); (2)
def e = new HashMap(m); (3)
-
declare
Map m
; allocateHashMap
instance →HashMap reference
; implicit castHashMap reference
toMap reference
→Map reference
; storeMap reference
tom
; -
declare
def d
; allocateArrayList
instance →ArrayList reference
; implicit castArrayList reference
todef
→def
; storedef
tod
; -
declare
def e
; load fromm
→Map reference
; allocateHashMap
instance with arguments (Map reference
) →HashMap reference
; implicit castHashMap reference
todef
→def
; storedef
toe
;
String Concatenation
Use the string concatenation operator '+'
to concatenate two values together
where at least one of the values is a String
type.
Grammar
concatenate: expression '+' expression;
Examples
-
String concatenation with different primitive types.
String x = "con"; (1) String y = x + "cat"; (2) String z = 4 + 5 + x; (3)
-
declare
String x
; storeString "con"
tox
; -
declare
String y
; load fromx
→String "con"
; concatString "con"
andString "cat"
→String "concat"
; storeString "concat"
toy
-
declare
String z
; addint 4
andint 5
→int 9
; concatint 9
andString "9concat"
; storeString "9concat"
toz
; (note the addition is done prior to the concatenation due to precedence and associativity of the specific operations)
-
-
String concatenation with the
def
type.def d = 2; (1) d = "con" + d + "cat"; (2)
-
declare
def
; implicit castint 2
todef
→def
; storedef
ind
; -
concat
String "con"
andint 9
→String "con9"
; concatString "con9"
andString "con"
→String "con9cat"
implicit castString "con9cat"
todef
→def
; storedef
tod
; (note the switch in type ofd
fromint
toString
)
-
Elvis
An elvis consists of two expressions. The first expression is evaluated
with to check for a null
value. If the first expression evaluates to
null
then the second expression is evaluated and its value used. If the first
expression evaluates to non-null
then the resultant value of the first
expression is used. Use the elvis operator '?:'
as a shortcut for the
conditional operator.
Errors
-
If the first expression or second expression cannot produce a
null
value.
Grammar
elvis: expression '?:' expression;
Examples
-
Elvis with different reference types.
List x = new ArrayList(); (1) List y = x ?: new ArrayList(); (2) y = null; (3) List z = y ?: new ArrayList(); (4)
-
declare
List x
; allocateArrayList
instance →ArrayList reference
; implicit castArrayList reference
toList reference
→List reference
; storeList reference
tox
; -
declare
List y
; loadx
→List reference
;List reference
equalsnull
→false
; evaluate 1st expression:List reference
→List reference
; storeList reference
toy
-
store
null
toy
; -
declare
List z
; loady
→List reference
;List reference
equalsnull
→true
; evaluate 2nd expression: allocateArrayList
instance →ArrayList reference
; implicit castArrayList reference
toList reference
→List reference
; storeList reference
toz
;
-
Operators: Array
Array Initialization
Use the array initialization operator '[] {}'
to allocate a single-dimensional
array type instance to the heap with a set of pre-defined
elements. Each value used to initialize an element in the array type instance is
cast to the specified element type value upon insertion. The order of specified
values is maintained.
Errors
-
If a value is not castable to the specified type value.
Grammar
array_initialization: 'new' TYPE '[' ']' '{' expression_list '}'
| 'new' TYPE '[' ']' '{' '}';
expression_list: expression (',' expression);
Example:
-
Array initialization with static values.
int[] x = new int[] {1, 2, 3}; (1)
-
declare
int[] x
; allocate1-d int array
instance withlength [3]
→1-d int array reference
; storeint 1
toindex [0]
of1-d int array reference
; storeint 2
toindex [1]
of1-d int array reference
; storeint 3
toindex [2]
of1-d int array reference
; store1-d int array reference
tox
;
-
-
Array initialization with non-static values.
int i = 1; (1) long l = 2L; (2) float f = 3.0F; (3) double d = 4.0; (4) String s = "5"; (5) def array = new def[] {i, l, f*d, s}; (6)
-
declare
int i
; storeint 1
toi
-
declare
long l
; storelong 2
tol
-
declare
float f
; storefloat 3.0
tof
-
declare
double d
; storedouble 4.0
tod
-
declare
String s
; storeString "5"
tos
-
declare
def array
; allocate1-d def array
instance withlength [4]
→1-d def array reference
; load fromi
→int 1
; implicit castint 1
todef
→def
; storedef
toindex [0]
of1-d def array reference
; load froml
→long 2
; implicit castlong 2
todef
→def
; storedef
toindex [1]
of1-d def array reference
; load fromf
→float 3.0
; load fromd
→double 4.0
; promotefloat 3.0
anddouble 4.0
: resultdouble
; implicit castfloat 3.0
todouble 3.0
→double 3.0
; multiplydouble 3.0
anddouble 4.0
→double 12.0
; implicit castdouble 12.0
todef
→def
; storedef
toindex [2]
of1-d def array reference
; load froms
→String "5"
; implicit castString "5"
todef
→def
; storedef
toindex [3]
of1-d def array reference
; implicit cast1-d int array reference
todef
→def
; storedef
toarray
-
Array Access
Use the array access operator '[]'
to store a value to or load a value from
an array type value. Each element of an array type value is
accessed with an int
type value to specify the index to store/load. The range
of elements within an array that are accessible is [0, size)
where size is the
number of elements specified at the time of allocation. Use a negative int
type value as an index to access an element in reverse from the end of an array
type value within a range of [-size, -1]
.
Errors
-
If a value other than an
int
type value or a value that is castable to anint
type value is provided as an index. -
If an element is accessed outside of the valid ranges.
Grammar
brace_access: '[' expression ']'
Examples
-
Array access with a single-dimensional array.
int[] x = new int[2]; (1) x[0] = 2; (2) x[1] = 5; (3) int y = x[0] + x[1]; (4) int z = 1; (5) int i = x[z]; (6)
-
declare
int[] x
; allocate1-d int array
instance withlength [2]
→1-d int array reference
; store1-d int array reference
tox
-
load from
x
→1-d int array reference
; storeint 2
toindex [0]
of1-d int array reference
; -
load from
x
→1-d int array reference
; storeint 5
toindex [1]
of1-d int array reference
; -
declare
int y
; load fromx
→1-d int array reference
; load fromindex [0]
of1-d int array reference
→int 2
; load fromx
→1-d int array reference
; load fromindex [1]
of1-d int array reference
→int 5
; addint 2
andint 5
→int 7
; storeint 7
toy
-
declare
int z
; storeint 1
toz
; -
declare
int i
; load fromx
→1-d int array reference
; load fromz
→int 1
; load fromindex [1]
of1-d int array reference
→int 5
; storeint 5
toi
;
-
-
Array access with the
def
type.def d = new int[2]; (1) d[0] = 2; (2) d[1] = 5; (3) def x = d[0] + d[1]; (4) def y = 1; (5) def z = d[y]; (6)
-
declare
def d
; allocate1-d int array
instance withlength [2]
→1-d int array reference
; implicit cast1-d int array reference
todef
→def
; storedef
tod
-
load from
d
→def
implicit castdef
to1-d int array reference
→1-d int array reference
; storeint 2
toindex [0]
of1-d int array reference
; -
load from
d
→def
implicit castdef
to1-d int array reference
→1-d int array reference
; storeint 5
toindex [1]
of1-d int array reference
; -
declare
int x
; load fromd
→def
implicit castdef
to1-d int array reference
→1-d int array reference
; load fromindex [0]
of1-d int array reference
→int 2
; load fromd
→def
implicit castdef
to1-d int array reference
→1-d int array reference
; load fromindex [1]
of1-d int array reference
→int 5
; addint 2
andint 5
→int 7
; implicit castint 7
todef
→def
; storedef
tox
-
declare
def y
; implicit castint 1
todef
→def
; storedef
toy
; -
declare
int i
; load fromd
→def
implicit castdef
to1-d int array reference
→1-d int array reference
; load fromy
→def
; implicit castdef
toint 1
→int 1
; load fromindex [1]
of1-d int array reference
→int 5
; implicit castint 5
todef
; storedef
toz
;
-
-
Array access with a multi-dimensional array.
int[][][] ia3 = new int[2][3][4]; (1) ia3[1][2][3] = 99; (2) int i = ia3[1][2][3]; (3)
-
declare
int[][][] ia
; allocate3-d int array
instance with length[2, 3, 4]
→3-d int array reference
; store3-d int array reference
toia3
-
load from
ia3
→3-d int array reference
; storeint 99
toindex [1, 2, 3]
of3-d int array reference
-
declare
int i
; load fromia3
→3-d int array reference
; load fromindex [1, 2, 3]
of3-d int array reference
→int 99
; storeint 99
toi
-
Array Length
An array type value contains a read-only member field named length
. The
length
field stores the size of the array as an int
type value where size is
the number of elements specified at the time of allocation. Use the
field access operator to load the field length
from an array type value.
Examples
-
Access the
length
field.int[] x = new int[10]; (1) int l = x.length; (2)
-
declare
int[] x
; allocate1-d int array
instance withlength [2]
→1-d int array reference
; store1-d int array reference
tox
-
declare
int l
; loadx
→1-d int array reference
; loadlength
from1-d int array reference
→int 10
; storeint 10
tol
;
-
New Array
Use the new array operator 'new []'
to allocate an array type instance to
the heap. Specify the element type following the new
token. Specify each
dimension with the [
and ]
tokens following the element type name. The size
of each dimension is specified by an int
type value in between each set of [
and ]
tokens.
Errors
-
If a value other than an
int
type value or a value that is castable to anint
type value is specified for a dimension’s size.
Grammar
new_array: 'new' TYPE ('[' expression ']')+;
Examples
-
Allocation of different array types.
int[] x = new int[5]; (1) x = new int[10]; (2) int y = 2; (3) def z = new def[y][y*2]; (4)
-
declare
int[] x
; allocate1-d int array
instance withlength [5]
→1-d int array reference
; store1-d int array reference
tox
-
allocate
1-d int array
instance withlength [10]
→1-d int array reference
; store1-d int array reference
tox
-
declare
int y
; storeint 2
toy
; -
declare
def z
; load fromy
→int 2 @0
; load fromy
→int 2 @1
; multiplyint 2 @1
byint 2 @2
→int 4
; allocate2-d int array
instance with length[2, 4]
→2-d int array reference
; implicit cast2-d int array reference
todef
→def
; storedef
toz
;
-
Statements
Painless supports all of Java’s
control flow statements except the switch
statement.
Conditional statements
If / Else
if (doc[item].size() == 0) {
// do something if "item" is missing
} else {
// do something else
}
Loop statements
For
Painless also supports the for in
syntax from Groovy:
for (def item : list) {
...
}
Scripts
Scripts are composed of one-to-many statements and are run in a sandbox that determines what local variables are immediately available along with what APIs are whitelisted for use.
Functions
A function is a named piece of code comprised of one-to-many statements to perform a specific task. A function is called multiple times in a single script to repeat its specific task. A parameter is a named type value available as a variable within the statement(s) of a function. A function specifies zero-to-many parameters, and when a function is called a value is specified per parameter. An argument is a value passed into a function at the point of call. A function specifies a return type value, though if the type is void then no value is returned. Any non-void type return value is available for use within an operation or is discarded otherwise.
You can declare functions at the beginning of a Painless script, for example:
boolean isNegative(def x) { x < 0 }
...
if (isNegative(someVar)) {
...
}
Lambdas
Lambda expressions and method references work the same as in Java.
list.removeIf(item -> item == 2);
list.removeIf((int item) -> item == 2);
list.removeIf((int item) -> { item == 2 });
list.sort((x, y) -> x - y);
list.sort(Integer::compare);
You can make method references to functions within the script with this
,
for example list.sort(this::mycompare)
.
Regexes
Regular expression constants are directly supported. To ensure fast performance, this is the only mechanism for creating patterns. Regular expressions are always constants and compiled efficiently a single time.
Pattern p = /[aeiou]/
Pattern flags
You can define flags on patterns in Painless by adding characters after the
trailing /
like /foo/i
or /foo \w #comment/iUx
. Painless exposes all of
the flags from Java’s
Pattern class using these characters:
Character | Java Constant | Example |
---|---|---|
|
CANON_EQ |
|
|
CASE_INSENSITIVE |
|
|
LITERAL |
|
|
MULTILINE |
|
|
DOTALL (aka single line) |
|
|
UNICODE_CHARACTER_CLASS |
|
|
UNICODE_CASE |
|
|
COMMENTS (aka extended) |
|
Painless contexts
A Painless script is evaluated within a context. Each context has values that are available as local variables, a whitelist that controls the available classes, and the methods and fields within those classes (API), and if and what type of value is returned.
A Painless script is typically executed within one of the contexts in the table below. Note this is not necessarily a comprehensive list as custom plugins and specialized code may define new ways to use a Painless script.
Name | Painless Documentation | Elasticsearch Documentation |
---|---|---|
Ingest processor |
{ref}/script-processor.html[Elasticsearch Documentation] |
|
Update |
{ref}/docs-update.html[Elasticsearch Documentation] |
|
Update by query |
{ref}/docs-update-by-query.html[Elasticsearch Documentation] |
|
Reindex |
{ref}/docs-reindex.html[Elasticsearch Documentation] |
|
Sort |
{ref}/search-request-sort.html[Elasticsearch Documentation] |
|
Similarity |
{ref}/index-modules-similarity.html[Elasticsearch Documentation] |
|
Weight |
{ref}/index-modules-similarity.html[Elasticsearch Documentation] |
|
Score |
{ref}/query-dsl-function-score-query.html[Elasticsearch Documentation] |
|
Field |
{ref}/search-request-script-fields.html[Elasticsearch Documentation] |
|
Filter |
{ref}/query-dsl-script-query.html[Elasticsearch Documentation] |
|
Minimum should match |
{ref}/query-dsl-terms-set-query.html[Elasticsearch Documentation] |
|
Metric aggregation initialization |
{ref}/search-aggregations-metrics-scripted-metric-aggregation.html[Elasticsearch Documentation] |
|
Metric aggregation map |
{ref}/search-aggregations-metrics-scripted-metric-aggregation.html[Elasticsearch Documentation] |
|
Metric aggregation combine |
{ref}/search-aggregations-metrics-scripted-metric-aggregation.html[Elasticsearch Documentation] |
|
Metric aggregation reduce |
{ref}/search-aggregations-metrics-scripted-metric-aggregation.html[Elasticsearch Documentation] |
|
Bucket script aggregation |
{ref}/search-aggregations-pipeline-bucket-script-aggregation.html[Elasticsearch Documentation] |
|
Bucket selector aggregation |
{ref}/search-aggregations-pipeline-bucket-selector-aggregation.html[Elasticsearch Documentation] |
|
Watcher condition |
{ref}/condition-script.html[Elasticsearch Documentation] |
|
Watcher transform |
{ref}/transform-script.html[Elasticsearch Documentation] |
Context examples
To run the examples, index the sample seat data into Elasticsearch. The examples must be run sequentially to work correctly.
-
Download the seat data. This data set contains booking information for a collection of plays. Each document represents a single seat for a play at a particular theater on a specific date and time.
Each document contains the following fields:
theatre
({ref}/keyword.html[keyword
])-
The name of the theater the play is in.
play
({ref}/text.html[text
])-
The name of the play.
actors
({ref}/text.html[text
])-
A list of actors in the play.
row
({ref}/number.html[integer
])-
The row of the seat.
number
({ref}/number.html[integer
])-
The number of the seat within a row.
cost
({ref}/number.html[double
])-
The cost of the ticket for the seat.
sold
({ref}/boolean.html[boolean
])-
Whether or not the seat is sold.
datetime
({ref}/date.html[date
])-
The date and time of the play as a date object.
date
({ref}/keyword.html[keyword
])-
The date of the play as a keyword.
time
({ref}/keyword.html[keyword
])-
The time of the play as a keyword.
-
{defguide}/running-elasticsearch.html[Start] Elasticsearch. Note these examples assume Elasticsearch and Kibana are running locally. To use the Console editor with a remote Kibana instance, click the settings icon and enter the Console URL. To submit a cURL request to a remote Elasticsearch instance, edit the request URL.
-
Create {ref}/mapping.html[mappings] for the sample data:
PUT /seats { "mappings": { "seat": { "properties": { "theatre": { "type": "keyword" }, "play": { "type": "text" }, "actors": { "type": "text" }, "row": { "type": "integer" }, "number": { "type": "integer" }, "cost": { "type": "double" }, "sold": { "type": "boolean" }, "datetime": { "type": "date" }, "date": { "type": "keyword" }, "time": { "type": "keyword" } } } } }
-
Run the ingest processor context example. This sets up a script ingest processor used on each document as the seat data is indexed.
-
Index the seat data:
curl -XPOST localhost:9200/seats/seat/_bulk?pipeline=seats -H "Content-Type: application/x-ndjson" --data-binary "@/<local-file-path>/seats-init.json"
Ingest processor context
Use a Painless script in an {ref}/script-processor.html[ingest processor] to modify documents upon insertion.
Variables
params
(Map
, read-only)-
User-defined parameters passed in as part of the query.
- {ref}/mapping-index-field.html[
ctx['_index']
] (String
) -
The name of the index.
- {ref}/mapping-type-field.html[
ctx['_type']
] (String
) -
The type of document within an index.
ctx
(Map
)-
Contains extracted JSON in a
Map
andList
structure for the fields that are part of the document.
Side Effects
- {ref}/mapping-index-field.html[
ctx['_index']
] -
Modify this to change the destination index for the current document.
- {ref}/mapping-type-field.html[
ctx['_type']
] -
Modify this to change the type for the current document.
ctx
(Map
)-
Modify the values in the
Map/List
structure to add, modify, or delete the fields of a document.
Return
- void
-
No expected return value.
API
The standard Painless API is available.
Example
To run this example, first follow the steps in context examples.
The seat data contains:
-
A date in the format
YYYY-MM-DD
where the second digit of both month and day is optional. -
A time in the format HH:MM* where the second digit of both hours and minutes is optional. The star (*) represents either the
String
AM
orPM
.
The following ingest script processes the date and time Strings
and stores the
result in a datetime
field.
String[] split(String s, char d) { (1)
int count = 0;
for (char c : s.toCharArray()) { (2)
if (c == d) {
++count;
}
}
if (count == 0) {
return new String[] {s}; (3)
}
String[] r = new String[count + 1]; (4)
int i0 = 0, i1 = 0;
count = 0;
for (char c : s.toCharArray()) { (5)
if (c == d) {
r[count++] = s.substring(i0, i1);
i0 = i1 + 1;
}
++i1;
}
r[count] = s.substring(i0, i1); (6)
return r;
}
String[] dateSplit = split(ctx.date, (char)"-"); (7)
String year = dateSplit[0].trim();
String month = dateSplit[1].trim();
if (month.length() == 1) { (8)
month = "0" + month;
}
String day = dateSplit[2].trim();
if (day.length() == 1) { (9)
day = "0" + day;
}
boolean pm = ctx.time.substring(ctx.time.length() - 2).equals("PM"); (10)
String[] timeSplit = split(
ctx.time.substring(0, ctx.time.length() - 2), (char)":"); (11)
int hours = Integer.parseInt(timeSplit[0].trim());
int minutes = Integer.parseInt(timeSplit[1].trim());
if (pm) { (12)
hours += 12;
}
String dts = year + "-" + month + "-" + day + "T" +
(hours < 10 ? "0" + hours : "" + hours) + ":" +
(minutes < 10 ? "0" + minutes : "" + minutes) +
":00+08:00"; (13)
ZonedDateTime dt = ZonedDateTime.parse(
dts, DateTimeFormatter.ISO_OFFSET_DATE_TIME); (14)
ctx.datetime = dt.getLong(ChronoField.INSTANT_SECONDS)*1000L; (15)
-
Creates a
split
function to split aString
type value using achar
type value as the delimiter. This is useful for handling the necessity of pulling out the individual pieces of the date and timeStrings
from the original seat data. -
The first pass through each
char
in theString
collects how many newStrings
the original is split into. -
Returns the original
String
if there are no instances of the delimitingchar
. -
Creates an array type value to collect the split
Strings
into based on the number ofchar
delimiters found in the first pass. -
The second pass through each
char
in theString
collects each split substring into an array type value ofStrings
. -
Collects the last substring into the array type value of
Strings
. -
Uses the
split
function to separate the dateString
from the seat data into year, month, and dayStrings
.- Note
-
-
The use of a
String
type value tochar
type value cast as part of the second argument since character literals do not exist. -
The use of the
ctx
ingest processor context variable to retrieve the data from thedate
field.
-
-
Appends the string literal
"0"
value to a single digit month since the format of the seat data allows for this case. -
Appends the string literal
"0"
value to a single digit day since the format of the seat data allows for this case. -
Sets the
boolean type
variable totrue
if the timeString
is a time in the afternoon or evening.- Note
-
-
The use of the
ctx
ingest processor context variable to retrieve the data from thetime
field.
-
-
Uses the
split
function to separate the timeString
from the seat data into hours and minutesStrings
.- Note
-
-
The use of the
substring
method to remove theAM
orPM
portion of the timeString
. -
The use of a
String
type value tochar
type value cast as part of the second argument since character literals do not exist. -
The use of the
ctx
ingest processor context variable to retrieve the data from thedate
field.
-
-
If the time
String
is an afternoon or evening value adds the integer literal12
to the existing hours to move to a 24-hour based time. -
Builds a new time
String
that is parsable using existing API methods. -
Creates a
ZonedDateTime
reference type value by using the API methodparse
to parse the new timeString
. -
Sets the datetime field
datetime
to the number of milliseconds retrieved from the API methodgetLong
.- Note
-
-
The use of the
ctx
ingest processor context variable to set the fielddatetime
. Manipulate each document’s fields with thectx
variable as each document is indexed.
-
Submit the following request:
PUT /_ingest/pipeline/seats
{
"description": "update datetime for seats",
"processors": [
{
"script": {
"source": "String[] split(String s, char d) { int count = 0; for (char c : s.toCharArray()) { if (c == d) { ++count; } } if (count == 0) { return new String[] {s}; } String[] r = new String[count + 1]; int i0 = 0, i1 = 0; count = 0; for (char c : s.toCharArray()) { if (c == d) { r[count++] = s.substring(i0, i1); i0 = i1 + 1; } ++i1; } r[count] = s.substring(i0, i1); return r; } String[] dateSplit = split(ctx.date, (char)\"-\"); String year = dateSplit[0].trim(); String month = dateSplit[1].trim(); if (month.length() == 1) { month = \"0\" + month; } String day = dateSplit[2].trim(); if (day.length() == 1) { day = \"0\" + day; } boolean pm = ctx.time.substring(ctx.time.length() - 2).equals(\"PM\"); String[] timeSplit = split(ctx.time.substring(0, ctx.time.length() - 2), (char)\":\"); int hours = Integer.parseInt(timeSplit[0].trim()); int minutes = Integer.parseInt(timeSplit[1].trim()); if (pm) { hours += 12; } String dts = year + \"-\" + month + \"-\" + day + \"T\" + (hours < 10 ? \"0\" + hours : \"\" + hours) + \":\" + (minutes < 10 ? \"0\" + minutes : \"\" + minutes) + \":00+08:00\"; ZonedDateTime dt = ZonedDateTime.parse(dts, DateTimeFormatter.ISO_OFFSET_DATE_TIME); ctx.datetime = dt.getLong(ChronoField.INSTANT_SECONDS)*1000L;"
}
}
]
}
Update context
Use a Painless script in an {ref}/docs-update.html[update] operation to add, modify, or delete fields within a single document.
Variables
params
(Map
, read-only)-
User-defined parameters passed in as part of the query.
ctx['op']
(String
)-
The name of the operation.
- {ref}/mapping-routing-field.html[
ctx['_routing']
] (String
, read-only) -
The value used to select a shard for document storage.
- {ref}/mapping-index-field.html[
ctx['_index']
] (String
, read-only) -
The name of the index.
- {ref}/mapping-type-field.html[
ctx['_type']
] (String
, read-only) -
The type of document within an index.
- {ref}/mapping-id-field.html[
ctx['_id']
] (int
, read-only) -
The unique document id.
ctx['_version']
(int
, read-only)-
The current version of the document.
ctx['_now']
(long
, read-only)-
The current timestamp in milliseconds.
- {ref}/mapping-source-field.html[
ctx['_source']
] (Map
) -
Contains extracted JSON in a
Map
andList
structure for the fields existing in a stored document.
Side Effects
ctx['op']
-
Use the default of
index
to update a document. Set tonone
to specify no operation ordelete
to delete the current document from the index. - {ref}/mapping-source-field.html[
ctx['_source']
] -
Modify the values in the
Map/List
structure to add, modify, or delete the fields of a document.
Return
void
-
No expected return value.
API
The standard Painless API is available.
Update by query context
Use a Painless script in an {ref}/docs-update-by-query.html[update by query] operation to add, modify, or delete fields within each of a set of documents collected as the result of query.
Variables
params
(Map
, read-only)-
User-defined parameters passed in as part of the query.
ctx['op']
(String
)-
The name of the operation.
- {ref}/mapping-routing-field.html[
ctx['_routing']
] (String
, read-only) -
The value used to select a shard for document storage.
- {ref}/mapping-index-field.html[
ctx['_index']
] (String
, read-only) -
The name of the index.
- {ref}/mapping-type-field.html[
ctx['_type']
] (String
, read-only) -
The type of document within an index.
- {ref}/mapping-id-field.html[
ctx['_id']
] (int
, read-only) -
The unique document id.
ctx['_version']
(int
, read-only)-
The current version of the document.
- {ref}/mapping-source-field.html[
ctx['_source']
] (Map
) -
Contains extracted JSON in a
Map
andList
structure for the fields existing in a stored document.
Side Effects
ctx['op']
-
Use the default of
index
to update a document. Set tonone
to specify no operation ordelete
to delete the current document from the index. - {ref}/mapping-source-field.html[
ctx['_source']
] -
Modify the values in the
Map/List
structure to add, modify, or delete the fields of a document.
Return
void
-
No expected return value.
API
The standard Painless API is available.
Reindex context
Use a Painless script in a {ref}/docs-reindex.html[reindex] operation to add, modify, or delete fields within each document in an original index as its reindexed into a target index.
Variables
params
(Map
, read-only)-
User-defined parameters passed in as part of the query.
ctx['op']
(String
)-
The name of the operation.
- {ref}/mapping-routing-field.html[
ctx['_routing']
] (String
) -
The value used to select a shard for document storage.
- {ref}/mapping-index-field.html[
ctx['_index']
] (String
) -
The name of the index.
- {ref}/mapping-type-field.html[
ctx['_type']
] (String
) -
The type of document within an index.
- {ref}/mapping-id-field.html[
ctx['_id']
] (int
, read-only) -
The unique document id.
ctx['_version']
(int
)-
The current version of the document.
- {ref}/mapping-source-field.html[
ctx['_source']
] (Map
) -
Contains extracted JSON in a
Map
andList
structure for the fields existing in a stored document.
Side Effects
ctx['op']
-
Use the default of
index
to update a document. Set tonone
to specify no operation ordelete
to delete the current document from the index. - {ref}/mapping-routing-field.html[
ctx['_routing']
] -
Modify this to change the routing value for the current document.
- {ref}/mapping-index-field.html[
ctx['_index']
] -
Modify this to change the destination index for the current document.
- {ref}/mapping-type-field.html[
ctx['_type']
] -
Modify this to change the type for the current document.
- {ref}/mapping-id-field.html[
ctx['_id']
] -
Modify this to change the id for the current document.
ctx['_version']
(int
)-
Modify this to modify the version for the current document.
- {ref}/mapping-source-field.html[
ctx['_source']
] -
Modify the values in the
Map/List
structure to add, modify, or delete the fields of a document.
Return
void
-
No expected return value.
API
The standard Painless API is available.
Sort context
Use a Painless script to {ref}/search-request-sort.html[sort] the documents in a query.
Variables
params
(Map
, read-only)-
User-defined parameters passed in as part of the query.
doc
(Map
, read-only)-
Contains the fields of the current document. For single-valued fields, the value can be accessed via
doc['fieldname'].value
. For multi-valued fields, this returns the first value; other values can be accessed viadoc['fieldname'].get(index)
_score
(double
read-only)-
The similarity score of the current document.
Return
double
-
The score for the specified document.
API
The standard Painless API is available.
Example
To run this example, first follow the steps in context examples.
To sort results by the length of the theatre
field, submit the following query:
GET /_search
{
"query" : {
"term" : { "sold" : "true" }
},
"sort" : {
"_script" : {
"type" : "number",
"script" : {
"lang": "painless",
"source": "doc['theatre'].value.length() * params.factor",
"params" : {
"factor" : 1.1
}
},
"order" : "asc"
}
}
}
Similarity context
Use a Painless script to create a {ref}/index-modules-similarity.html[similarity] equation for scoring documents in a query.
Variables
params
(Map
, read-only)-
User-defined parameters passed in as part of the query.
Variables
params
(Map
, read-only)-
User-defined parameters passed in at query-time.
weight
(float
, read-only)-
The weight as calculated by a weight script
query.boost
(float
, read-only)-
The boost value if provided by the query. If this is not provided the value is
1.0f
. field.docCount
(long
, read-only)-
The number of documents that have a value for the current field.
field.sumDocFreq
(long
, read-only)-
The sum of all terms that exist for the current field. If this is not available the value is
-1
. field.sumTotalTermFreq
(long
, read-only)-
The sum of occurrences in the index for all the terms that exist in the current field. If this is not available the value is
-1
. term.docFreq
(long
, read-only)-
The number of documents that contain the current term in the index.
term.totalTermFreq
(long
, read-only)-
The total occurrences of the current term in the index.
doc.length
(long
, read-only)-
The number of tokens the current document has in the current field. This is decoded from the stored {ref}/norms.html[norms] and may be approximate for long fields
doc.freq
(long
, read-only)-
The number of occurrences of the current term in the current document for the current field.
Note that the query
, field
, and term
variables are also available to the
weight context. They are more efficiently used
there, as they are constant for all documents.
For queries that contain multiple terms, the script is called once for each
term with that term’s calculated weight, and the results are summed. Note that some
terms might have a doc.freq
value of 0
on a document, for example if a query
uses synonyms.
Return
double
-
The similarity score for the current document.
API
The standard Painless API is available.
Weight context
Use a Painless script to create a {ref}/index-modules-similarity.html[weight] for use in a similarity script. The weight makes up the part of the similarity calculation that is independent of the document being scored, and so can be built up front and cached.
Queries that contain multiple terms calculate a separate weight for each term.
Variables
params
(Map
, read-only)-
User-defined parameters passed in as part of the query.
query.boost
(float
, read-only)-
The boost value if provided by the query. If this is not provided the value is
1.0f
. field.docCount
(long
, read-only)-
The number of documents that have a value for the current field.
field.sumDocFreq
(long
, read-only)-
The sum of all terms that exist for the current field. If this is not available the value is
-1
. field.sumTotalTermFreq
(long
, read-only)-
The sum of occurrences in the index for all the terms that exist in the current field. If this is not available the value is
-1
. term.docFreq
(long
, read-only)-
The number of documents that contain the current term in the index.
term.totalTermFreq
(long
, read-only)-
The total occurrences of the current term in the index.
Return
double
-
A scoring factor used across all documents.
API
The standard Painless API is available.
Score context
Use a Painless script in a {ref}/query-dsl-function-score-query.html[function score] to apply a new score to documents returned from a query.
Variables
params
(Map
, read-only)-
User-defined parameters passed in as part of the query.
doc
(Map
, read-only)-
Contains the fields of the current document. For single-valued fields, the value can be accessed via
doc['fieldname'].value
. For multi-valued fields, this returns the first value; other values can be accessed viadoc['fieldname'].get(index)
_score
(double
read-only)-
The similarity score of the current document.
Return
double
-
The score for the current document.
API
The standard Painless API is available.
Example
To run this example, first follow the steps in context examples.
The following query finds all unsold seats, with lower 'row' values scored higher.
GET /seats/_search
{
"query": {
"function_score": {
"query": {
"match": { "sold": "false" }
},
"script_score" : {
"script" : {
"source": "1.0 / doc['row'].value"
}
}
}
}
}
Field context
Use a Painless script to create a {ref}/search-request-script-fields.html[script field] to return a customized value for each document in the results of a query.
Variables
params
(Map
, read-only)-
User-defined parameters passed in as part of the query.
doc
(Map
, read-only)-
Contains the fields of the specified document where each field is a
List
of values. - {ref}/mapping-source-field.html[
ctx['_source']
] (Map
) -
Contains extracted JSON in a
Map
andList
structure for the fields existing in a stored document. _score
(double
read-only)-
The original score of the specified document.
Return
Object
-
The customized value for each document.
API
The standard Painless API is available.
Example
To run this example, first follow the steps in context examples.
You can then use these two example scripts to compute custom information for each search hit and output it to two new fields.
The first script gets the doc value for the datetime
field and calls
the getDayOfWeek
function to determine the corresponding day of the week.
doc['datetime'].value.getDayOfWeek();
The second script calculates the number of actors. Actors' names are stored
as a text array in the actors
field.
params['_source']['actors'].length; (1)
-
By default, doc values are not available for text fields. However, you can still calculate the number of actors by extracting actors from
_source
. Note thatparams['_source']['actors']
is a list.
Submit the following request:
GET seats/_search
{
"query" : {
"match_all": {}
},
"script_fields" : {
"day-of-week" : {
"script" : {
"source": "doc['datetime'].value.getDayOfWeek()"
}
},
"number-of-actors" : {
"script" : {
"source": "params['_source']['actors'].length"
}
}
}
}
Filter context
Use a Painless script as a {ref}/query-dsl-script-query.html[filter] in a query to include and exclude documents.
Variables
params
(Map
, read-only)-
User-defined parameters passed in as part of the query.
doc
(Map
, read-only)-
Contains the fields of the current document where each field is a
List
of values.
Return
boolean
-
Return
true
if the current document should be returned as a result of the query, andfalse
otherwise.
API
The standard Painless API is available.
Example
To run this example, first follow the steps in context examples.
This script finds all unsold documents that cost less than $18.
doc['sold'].value == false && doc['cost'].value < 18
Defining cost as a script parameter enables the cost to be configured in the script query request. For example, the following request finds all available theatre seats for evening performances that are under $18.
GET evening/_search
{
"query": {
"bool" : {
"filter" : {
"script" : {
"script" : {
"source" : "doc['sold'].value == false && doc['cost'].value < params.cost",
"params" : {
"cost" : 18
}
}
}
}
}
}
}
Minimum should match context
Use a Painless script to specify the {ref}/query-dsl-terms-set-query.html[minimum] number of terms that a specified field needs to match with for a document to be part of the query results.
Variables
params
(Map
, read-only)-
User-defined parameters passed in as part of the query.
params['num_terms']
(int
, read-only)-
The number of terms specified to match with.
doc
(Map
, read-only)-
Contains the fields of the current document where each field is a
List
of values.
Return
int
-
The minimum number of terms required to match the current document.
API
The standard Painless API is available.
Example
To run this example, first follow the steps in context examples.
Imagine that you want to find seats to performances by your favorite
actors. You have a list of favorite actors in mind, and you want
to find performances where the cast includes at least a certain
number of them. terms_set
query with minimum_should_match_script
is a way to accomplish this. To make the query request more configurable,
you can define min_actors_to_see
as a script parameter.
To ensure that the parameter min_actors_to_see
doesn’t exceed
the number of favorite actors, you can use num_term`s to get
the number of actors in the list and `Math.min
to get the lesser
of the two.
Math.min(params['num_terms'], params['min_actors_to_see'])
The following request finds seats to performances with at least two of the three specified actors.
GET seats/_search
{
"query" : {
"terms_set": {
"actors" : {
"terms" : ["smith", "earns", "black"],
"minimum_should_match_script": {
"source": "Math.min(params['num_terms'], params['min_actors_to_see'])",
"params" : {
"min_actors_to_see" : 2
}
}
}
}
}
}
Metric aggregation initialization context
Use a Painless script to {ref}/search-aggregations-metrics-scripted-metric-aggregation.html[initialize] values for use in a scripted metric aggregation. An initialization script is run prior to document collection once per shard and is optional as part of the full metric aggregation.
Variables
params
(Map
, read-only)-
User-defined parameters passed in as part of the query.
state
(Map
)-
Empty
Map
used to add values for use in a map script.
Side Effects
state
(Map
)-
Add values to this
Map
to for use in a map. Additional values must be of the typeMap
,List
,String
or primitive.
Return
void
-
No expected return value.
API
The standard Painless API is available.
Metric aggregation map context
Use a Painless script to {ref}/search-aggregations-metrics-scripted-metric-aggregation.html[map] values for use in a scripted metric aggregation. A map script is run once per collected document following an optional initialization script and is required as part of a full metric aggregation.
Variables
params
(Map
, read-only)-
User-defined parameters passed in as part of the query.
state
(Map
)-
Map
used to add values for processing in a combine script or to be returned from the aggregation. doc
(Map
, read-only)-
Contains the fields of the current document where each field is a
List
of values. _score
(double
read-only)-
The similarity score of the current document.
Side Effects
state
(Map
)-
Use this
Map
to add values for processing in a combine script. Additional values must be of the typeMap
,List
,String
or primitive. The samestate
Map
is shared between all aggregated documents on a given shard. If an initialization script is provided as part of the aggregation then values added from the initialization script are available. If no combine script is specified, values must be directly stored instate
in a usable form. If no combine script and no reduce script are specified, thestate
values are used as the result.
Return
void
-
No expected return value.
API
The standard Painless API is available.
Metric aggregation combine context
Use a Painless script to {ref}/search-aggregations-metrics-scripted-metric-aggregation.html[combine] values for use in a scripted metric aggregation. A combine script is run once per shard following a map script and is optional as part of a full metric aggregation.
Variables
params
(Map
, read-only)-
User-defined parameters passed in as part of the query.
state
(Map
)-
Map
with values available from the prior map script.
Return
List
,Map
,String
, or primitive-
A value collected for use in a reduce script. If no reduce script is specified, the value is used as part of the result.
API
The standard Painless API is available.
Metric aggregation reduce context
Use a Painless script to {ref}/search-aggregations-metrics-scripted-metric-aggregation.html[reduce] values to produce the result of a scripted metric aggregation. A reduce script is run once on the coordinating node following a combine script (or a map script if no combine script is specified) and is optional as part of a full metric aggregation.
Variables
params
(Map
, read-only)-
User-defined parameters passed in as part of the query.
states
(Map
)-
Map
with values available from the prior combine script (or a map script if no combine script is specified).
Return
List
,Map
,String
, or primitive-
A value used as the result.
API
The standard Painless API is available.
Bucket script aggregation context
Use a Painless script in an
{ref}/search-aggregations-pipeline-bucket-script-aggregation.html[bucket_script
pipeline aggregation]
to calculate a value as a result in a bucket.
Variables
params
(Map
, read-only)-
User-defined parameters passed in as part of the query. The parameters include values defined as part of the
buckets_path
.
Return
- numeric
-
The calculated value as the result.
API
The standard Painless API is available.
Example
To run this example, first follow the steps in context examples.
The painless context in a bucket_script
aggregation provides a params
map. This map contains both
user-specified custom values, as well as the values from other aggregations specified in the buckets_path
property.
This example takes the values from a min and max aggregation, calculates the difference, and adds the user-specified base_cost to the result:
(params.max - params.min) + params.base_cost
Note that the values are extracted from the params
map. In context, the aggregation looks like this:
GET /seats/_search
{
"size": 0,
"aggs": {
"theatres": {
"terms": {
"field": "theatre",
"size": 10
},
"aggs": {
"min_cost": {
"min": {
"field": "cost"
}
},
"max_cost": {
"max": {
"field": "cost"
}
},
"spread_plus_base": {
"bucket_script": {
"buckets_path": { (1)
"min": "min_cost",
"max": "max_cost"
},
"script": {
"params": {
"base_cost": 5 (2)
},
"source": "(params.max - params.min) + params.base_cost"
}
}
}
}
}
}
}
-
The
buckets_path
points to two aggregations (min_cost
,max_cost
) and addsmin
/max
variables to theparams
map -
The user-specified
base_cost
is also added to the script’sparams
map
Bucket selector aggregation context
Use a Painless script in an
{ref}/search-aggregations-pipeline-bucket-selector-aggregation.html[bucket_selector
aggregation]
to determine if a bucket should be retained or filtered out.
Variables
params
(Map
, read-only)-
User-defined parameters passed in as part of the query. The parameters include values defined as part of the
buckets_path
.
Return
- boolean
-
True if the the bucket should be retained, false if the bucket should be filtered out.
API
To run this example, first follow the steps in context examples.
The painless context in a bucket_selector
aggregation provides a params
map. This map contains both
user-specified custom values, as well as the values from other aggregations specified in the buckets_path
property.
Unlike some other aggregation contexts, the bucket_selector
context must return a boolean true
or false
.
This example finds the max of each bucket, adds a user-specified base_cost, and retains all of the
buckets that are greater than 10
.
params.max + params.base_cost > 10
Note that the values are extracted from the params
map. The script is in the form of an expression
that returns true
or false
. In context, the aggregation looks like this:
GET /seats/_search
{
"size": 0,
"aggs": {
"theatres": {
"terms": {
"field": "theatre",
"size": 10
},
"aggs": {
"max_cost": {
"max": {
"field": "cost"
}
},
"filtering_agg": {
"bucket_selector": {
"buckets_path": { (1)
"max": "max_cost"
},
"script": {
"params": {
"base_cost": 5 (2)
},
"source": "params.max + params.base_cost > 10"
}
}
}
}
}
}
}
-
The
buckets_path
points to the max aggregations (max_cost
) and addsmax
variables to theparams
map -
The user-specified
base_cost
is also added to theparams
map
Analysis Predicate Context
Use a painless script to determine whether or not the current token in an analysis chain matches a predicate.
Variables
params
(Map
, read-only)-
User-defined parameters passed in as part of the query.
token.term
(CharSequence
, read-only)-
The characters of the current token
token.position
(int
, read-only)-
The position of the current token
token.positionIncrement
(int
, read-only)-
The position increment of the current token
token.positionLength
(int
, read-only)-
The position length of the current token
token.startOffset
(int
, read-only)-
The start offset of the current token
token.endOffset
(int
, read-only)-
The end offset of the current token
token.type
(String
, read-only)-
The type of the current token
token.keyword
('boolean`, read-only)-
Whether or not the current token is marked as a keyword
Return
boolean
-
Whether or not the current token matches the predicate
API
The standard Painless API is available.
Watcher condition context
Use a Painless script as a {ref}/condition-script.html[watch condition] that determines whether to execute a watch or a particular action within a watch. Condition scripts return a Boolean value to indicate the status of the condition.
The following variables are available in all watcher contexts.
Variables
params
(Map
, read-only)-
User-defined parameters passed in as part of the query.
ctx['watch_id']
(String
, read-only)-
The id of the watch.
ctx['id']
(String
, read-only)-
The server generated unique identifer for the run watch.
ctx['metadata']
(Map
, read-only)-
Metadata can be added to the top level of the watch definition. This is user defined and is typically used to consolidate duplicate values in a watch.
ctx['execution_time']
(ZonedDateTime
, read-only)-
The time the watch began execution.
ctx['trigger']['scheduled_time']
(ZonedDateTime
, read-only)-
The scheduled trigger time for the watch. This is the time the watch should be executed.
ctx['trigger']['triggered_time']
(ZonedDateTime
, read-only)-
The actual trigger time for the watch. This is the time the watch was triggered for execution.
ctx['payload']
(Map
, read-only)-
The accessible watch data based upon the {ref}/input.html[watch input].
API
The standard Painless API is available.
To run this example, first follow the steps in context examples.
Return
boolean
-
Expects
true
if the condition is met, andfalse
if it is not.
API
The standard Painless API is available.
Example
POST _watcher/watch/_execute
{
"watch" : {
"trigger" : { "schedule" : { "interval" : "24h" } },
"input" : {
"search" : {
"request" : {
"indices" : [ "seats" ],
"body" : {
"query" : {
"term": { "sold": "true"}
},
"aggs" : {
"theatres" : {
"terms" : { "field" : "play" },
"aggs" : {
"money" : {
"sum": { "field" : "cost" }
}
}
}
}
}
}
}
},
"condition" : {
"script" :
"""
return ctx.payload.aggregations.theatres.buckets.stream() (1)
.filter(theatre -> theatre.money.value < 15000 ||
theatre.money.value > 50000) (2)
.count() > 0 (3)
"""
},
"actions" : {
"my_log" : {
"logging" : {
"text" : "The output of the search was : {{ctx.payload.aggregations.theatres.buckets}}"
}
}
}
}
}
-
The Java Stream API is used in the condition. This API allows manipulation of the elements of the list in a pipeline.
-
The stream filter removes items that do not meet the filter criteria.
-
If there is at least one item in the list, the condition evaluates to true and the watch is executed.
The following action condition script controls execution of the my_log action based on the value of the seats sold for the plays in the data set. The script aggregates the total sold seats for each play and returns true if there is at least one play that has sold over $50,000.
POST _watcher/watch/_execute
{
"watch" : {
"trigger" : { "schedule" : { "interval" : "24h" } },
"input" : {
"search" : {
"request" : {
"indices" : [ "seats" ],
"body" : {
"query" : {
"term": { "sold": "true"}
},
"aggs" : {
"theatres" : {
"terms" : { "field" : "play" },
"aggs" : {
"money" : {
"sum": { "field" : "cost" }
}
}
}
}
}
}
}
},
"actions" : {
"my_log" : {
"condition": { (1)
"script" :
"""
return ctx.payload.aggregations.theatres.buckets.stream()
.anyMatch(theatre -> theatre.money.value > 50000) (2)
"""
},
"logging" : {
"text" : "At least one play has grossed over $50,000: {{ctx.payload.aggregations.theatres.buckets}}"
}
}
}
}
}
This example uses a nearly identical condition as the previous example. The differences below are subtle and are worth calling out.
-
The location of the condition is no longer at the top level, but is within an individual action.
-
Instead of a filter,
anyMatch
is used to return a boolean value
The following example shows scripted watch and action conditions within the context of a complete watch. This watch also uses a scripted transform.
POST _watcher/watch/_execute
{
"watch" : {
"metadata" : { "high_threshold": 50000, "low_threshold": 15000 },
"trigger" : { "schedule" : { "interval" : "24h" } },
"input" : {
"search" : {
"request" : {
"indices" : [ "seats" ],
"body" : {
"query" : {
"term": { "sold": "true"}
},
"aggs" : {
"theatres" : {
"terms" : { "field" : "play" },
"aggs" : {
"money" : {
"sum": { "field" : "cost" }
}
}
}
}
}
}
}
},
"condition" : {
"script" :
"""
return ctx.payload.aggregations.theatres.buckets.stream()
.anyMatch(theatre -> theatre.money.value < ctx.metadata.low_threshold ||
theatre.money.value > ctx.metadata.high_threshold)
"""
},
"transform" : {
"script":
"""
return [
'money_makers': ctx.payload.aggregations.theatres.buckets.stream()
.filter(t -> {
return t.money.value > ctx.metadata.high_threshold
})
.map(t -> {
return ['play': t.key, 'total_value': t.money.value ]
}).collect(Collectors.toList()),
'duds' : ctx.payload.aggregations.theatres.buckets.stream()
.filter(t -> {
return t.money.value < ctx.metadata.low_threshold
})
.map(t -> {
return ['play': t.key, 'total_value': t.money.value ]
}).collect(Collectors.toList())
]
"""
},
"actions" : {
"log_money_makers" : {
"condition": {
"script" : "return ctx.payload.money_makers.size() > 0"
},
"transform": {
"script" :
"""
def formatter = NumberFormat.getCurrencyInstance();
return [
'plays_value': ctx.payload.money_makers.stream()
.map(t-> formatter.format(t.total_value) + ' for the play ' + t.play)
.collect(Collectors.joining(", "))
]
"""
},
"logging" : {
"text" : "The following plays contain the highest grossing total income: {{ctx.payload.plays_value}}"
}
},
"log_duds" : {
"condition": {
"script" : "return ctx.payload.duds.size() > 0"
},
"transform": {
"script" :
"""
def formatter = NumberFormat.getCurrencyInstance();
return [
'plays_value': ctx.payload.duds.stream()
.map(t-> formatter.format(t.total_value) + ' for the play ' + t.play)
.collect(Collectors.joining(", "))
]
"""
},
"logging" : {
"text" : "The following plays need more advertising due to their low total income: {{ctx.payload.plays_value}}"
}
}
}
}
}
The following example shows the use of metadata and transforming dates into a readable format.
POST _watcher/watch/_execute
{
"watch" : {
"metadata" : { "min_hits": 10000 },
"trigger" : { "schedule" : { "interval" : "24h" } },
"input" : {
"search" : {
"request" : {
"indices" : [ "seats" ],
"body" : {
"query" : {
"term": { "sold": "true"}
},
"aggs" : {
"theatres" : {
"terms" : { "field" : "play" },
"aggs" : {
"money" : {
"sum": { "field" : "cost" }
}
}
}
}
}
}
}
},
"condition" : {
"script" :
"""
return ctx.payload.hits.total > ctx.metadata.min_hits
"""
},
"transform" : {
"script" :
"""
def theDate = ZonedDateTime.ofInstant(ctx.execution_time.toInstant(), ctx.execution_time.getZone());
return ['human_date': DateTimeFormatter.RFC_1123_DATE_TIME.format(theDate),
'aggregations': ctx.payload.aggregations]
"""
},
"actions" : {
"my_log" : {
"logging" : {
"text" : "The watch was successfully executed on {{ctx.payload.human_date}} and contained {{ctx.payload.aggregations.theatres.buckets.size}} buckets"
}
}
}
}
}
Watcher transform context
Use a Painless script as a {ref}/transform-script.html[watch transform] to transform a payload into a new payload for further use in the watch. Transform scripts return an Object value of the new payload.
The following variables are available in all watcher contexts.
Variables
params
(Map
, read-only)-
User-defined parameters passed in as part of the query.
ctx['watch_id']
(String
, read-only)-
The id of the watch.
ctx['id']
(String
, read-only)-
The server generated unique identifer for the run watch.
ctx['metadata']
(Map
, read-only)-
Metadata can be added to the top level of the watch definition. This is user defined and is typically used to consolidate duplicate values in a watch.
ctx['execution_time']
(ZonedDateTime
, read-only)-
The time the watch began execution.
ctx['trigger']['scheduled_time']
(ZonedDateTime
, read-only)-
The scheduled trigger time for the watch. This is the time the watch should be executed.
ctx['trigger']['triggered_time']
(ZonedDateTime
, read-only)-
The actual trigger time for the watch. This is the time the watch was triggered for execution.
ctx['payload']
(Map
, read-only)-
The accessible watch data based upon the {ref}/input.html[watch input].
API
The standard Painless API is available.
To run this example, first follow the steps in context examples.
Return
Object
-
The new payload.
API
The standard Painless API is available.
Example
POST _watcher/watch/_execute
{
"watch" : {
"trigger" : { "schedule" : { "interval" : "24h" } },
"input" : {
"search" : {
"request" : {
"indices" : [ "seats" ],
"body" : {
"query" : { "term": { "sold": "true"} },
"aggs" : {
"theatres" : {
"terms" : { "field" : "play" },
"aggs" : {
"money" : {
"sum": { "field" : "cost" }
}
}
}
}
}
}
}
},
"transform" : {
"script":
"""
return [
'money_makers': ctx.payload.aggregations.theatres.buckets.stream() (1)
.filter(t -> { (2)
return t.money.value > 50000
})
.map(t -> { (3)
return ['play': t.key, 'total_value': t.money.value ]
}).collect(Collectors.toList()), (4)
'duds' : ctx.payload.aggregations.theatres.buckets.stream() (5)
.filter(t -> {
return t.money.value < 15000
})
.map(t -> {
return ['play': t.key, 'total_value': t.money.value ]
}).collect(Collectors.toList())
]
"""
},
"actions" : {
"my_log" : {
"logging" : {
"text" : "The output of the payload was transformed to {{ctx.payload}}"
}
}
}
}
}
-
The Java Stream API is used in the transform. This API allows manipulation of the elements of the list in a pipeline.
-
The stream filter removes items that do not meet the filter criteria.
-
The stream map transforms each element into a new object.
-
The collector reduces the stream to a
java.util.List
. -
This is done again for the second set of values in the transform.
The following action transform changes each value in the mod_log action into a String
.
This transform does not change the values in the unmod_log action.
POST _watcher/watch/_execute
{
"watch" : {
"trigger" : { "schedule" : { "interval" : "24h" } },
"input" : {
"search" : {
"request" : {
"indices" : [ "seats" ],
"body" : {
"query" : {
"term": { "sold": "true"}
},
"aggs" : {
"theatres" : {
"terms" : { "field" : "play" },
"aggs" : {
"money" : {
"sum": { "field" : "cost" }
}
}
}
}
}
}
}
},
"actions" : {
"mod_log" : {
"transform": { (1)
"script" :
"""
def formatter = NumberFormat.getCurrencyInstance();
return [
'msg': ctx.payload.aggregations.theatres.buckets.stream()
.map(t-> formatter.format(t.money.value) + ' for the play ' + t.key)
.collect(Collectors.joining(", "))
]
"""
},
"logging" : {
"text" : "The output of the payload was transformed to: {{ctx.payload.msg}}"
}
},
"unmod_log" : { (2)
"logging" : {
"text" : "The output of the payload was not transformed and this value should not exist: {{ctx.payload.msg}}"
}
}
}
}
}
This example uses the streaming API in a very similar manner. The differences below are subtle and worth calling out.
-
The location of the transform is no longer at the top level, but is within an individual action.
-
A second action that does not transform the payload is given for reference.
The following example shows scripted watch and action transforms within the context of a complete watch. This watch also uses a scripted condition.
POST _watcher/watch/_execute
{
"watch" : {
"metadata" : { "high_threshold": 50000, "low_threshold": 15000 },
"trigger" : { "schedule" : { "interval" : "24h" } },
"input" : {
"search" : {
"request" : {
"indices" : [ "seats" ],
"body" : {
"query" : {
"term": { "sold": "true"}
},
"aggs" : {
"theatres" : {
"terms" : { "field" : "play" },
"aggs" : {
"money" : {
"sum": { "field" : "cost" }
}
}
}
}
}
}
}
},
"condition" : {
"script" :
"""
return ctx.payload.aggregations.theatres.buckets.stream()
.anyMatch(theatre -> theatre.money.value < ctx.metadata.low_threshold ||
theatre.money.value > ctx.metadata.high_threshold)
"""
},
"transform" : {
"script":
"""
return [
'money_makers': ctx.payload.aggregations.theatres.buckets.stream()
.filter(t -> {
return t.money.value > ctx.metadata.high_threshold
})
.map(t -> {
return ['play': t.key, 'total_value': t.money.value ]
}).collect(Collectors.toList()),
'duds' : ctx.payload.aggregations.theatres.buckets.stream()
.filter(t -> {
return t.money.value < ctx.metadata.low_threshold
})
.map(t -> {
return ['play': t.key, 'total_value': t.money.value ]
}).collect(Collectors.toList())
]
"""
},
"actions" : {
"log_money_makers" : {
"condition": {
"script" : "return ctx.payload.money_makers.size() > 0"
},
"transform": {
"script" :
"""
def formatter = NumberFormat.getCurrencyInstance();
return [
'plays_value': ctx.payload.money_makers.stream()
.map(t-> formatter.format(t.total_value) + ' for the play ' + t.play)
.collect(Collectors.joining(", "))
]
"""
},
"logging" : {
"text" : "The following plays contain the highest grossing total income: {{ctx.payload.plays_value}}"
}
},
"log_duds" : {
"condition": {
"script" : "return ctx.payload.duds.size() > 0"
},
"transform": {
"script" :
"""
def formatter = NumberFormat.getCurrencyInstance();
return [
'plays_value': ctx.payload.duds.stream()
.map(t-> formatter.format(t.total_value) + ' for the play ' + t.play)
.collect(Collectors.joining(", "))
]
"""
},
"logging" : {
"text" : "The following plays need more advertising due to their low total income: {{ctx.payload.plays_value}}"
}
}
}
}
}
The following example shows the use of metadata and transforming dates into a readable format.
POST _watcher/watch/_execute
{
"watch" : {
"metadata" : { "min_hits": 10000 },
"trigger" : { "schedule" : { "interval" : "24h" } },
"input" : {
"search" : {
"request" : {
"indices" : [ "seats" ],
"body" : {
"query" : {
"term": { "sold": "true"}
},
"aggs" : {
"theatres" : {
"terms" : { "field" : "play" },
"aggs" : {
"money" : {
"sum": { "field" : "cost" }
}
}
}
}
}
}
}
},
"condition" : {
"script" :
"""
return ctx.payload.hits.total > ctx.metadata.min_hits
"""
},
"transform" : {
"script" :
"""
def theDate = ZonedDateTime.ofInstant(ctx.execution_time.toInstant(), ctx.execution_time.getZone());
return ['human_date': DateTimeFormatter.RFC_1123_DATE_TIME.format(theDate),
'aggregations': ctx.payload.aggregations]
"""
},
"actions" : {
"my_log" : {
"logging" : {
"text" : "The watch was successfully executed on {{ctx.payload.human_date}} and contained {{ctx.payload.aggregations.theatres.buckets.size}} buckets"
}
}
}
}
}
Painless API Reference
Painless has a strict whitelist for methods and classes to ensure all
painless scripts are secure. Most of these methods are exposed directly
from the Java Runtime Environment (JRE) while others are part of
Elasticsearch or Painless itself. Below is a list of all available
classes grouped with their respected methods. Clicking on the method
name takes you to the documentation for that specific method. Methods
defined in the JRE also have a (java 9)
link which can be used to see
the method’s documentation in Java 9.
- AbstractMap.SimpleEntry
-
-
[[painless-api-reference-AbstractMap-SimpleEntry-AbstractMap.SimpleEntry-1]]link:{java8-javadoc}/java/util/AbstractMap.SimpleEntry.html#AbstractMap.SimpleEntry%2Djava.util.Map$Entry%2D[AbstractMap.SimpleEntry](<<painless-api-reference-Map-Entry,Map.Entry>>) (java 9)
-
[[painless-api-reference-AbstractMap-SimpleEntry-AbstractMap.SimpleEntry-2]]link:{java8-javadoc}/java/util/AbstractMap.SimpleEntry.html#AbstractMap.SimpleEntry%2Djava.lang.Object%2Djava.lang.Object%2D[AbstractMap.SimpleEntry](def, def) (java 9)
-
Inherits methods from <<painless-api-reference-Map-Entry,Map.Entry>>, <<painless-api-reference-Object,Object>>
-
- AbstractMap.SimpleImmutableEntry
-
-
[[painless-api-reference-AbstractMap-SimpleImmutableEntry-AbstractMap.SimpleImmutableEntry-1]]link:{java8-javadoc}/java/util/AbstractMap.SimpleImmutableEntry.html#AbstractMap.SimpleImmutableEntry%2Djava.util.Map$Entry%2D[AbstractMap.SimpleImmutableEntry](<<painless-api-reference-Map-Entry,Map.Entry>>) (java 9)
-
[[painless-api-reference-AbstractMap-SimpleImmutableEntry-AbstractMap.SimpleImmutableEntry-2]]link:{java8-javadoc}/java/util/AbstractMap.SimpleImmutableEntry.html#AbstractMap.SimpleImmutableEntry%2Djava.lang.Object%2Djava.lang.Object%2D[AbstractMap.SimpleImmutableEntry](def, def) (java 9)
-
Inherits methods from <<painless-api-reference-Map-Entry,Map.Entry>>, <<painless-api-reference-Object,Object>>
-
- Annotation
-
-
[[painless-api-reference-Annotation-Annotation-1]]link:{java8-javadoc}/java/text/Annotation.html#Annotation%2Djava.lang.Object%2D[Annotation](<<painless-api-reference-Object,Object>>) (java 9)
-
[[painless-api-reference-Annotation-getValue-0]]def link:{java8-javadoc}/java/text/Annotation.html#getValue%2D%2D[getValue]() (java 9)
-
Inherits methods from <<painless-api-reference-Object,Object>>
-
- Appendable
-
-
[[painless-api-reference-Appendable-append-3]]<<painless-api-reference-Appendable,Appendable>> link:{java8-javadoc}/java/lang/Appendable.html#append%2Djava.lang.CharSequence%2Dint%2Dint%2D[append](<<painless-api-reference-CharSequence,CharSequence>>, int, int) (java 9)
-
Inherits methods from <<painless-api-reference-Object,Object>>
-
- ArithmeticException
-
-
[[painless-api-reference-ArithmeticException-ArithmeticException-0]]link:{java8-javadoc}/java/lang/ArithmeticException.html#ArithmeticException%2D%2D[ArithmeticException]() (java 9)
-
[[painless-api-reference-ArithmeticException-ArithmeticException-1]]link:{java8-javadoc}/java/lang/ArithmeticException.html#ArithmeticException%2Djava.lang.String%2D[ArithmeticException](<<painless-api-reference-String,String>>) (java 9)
-
Inherits methods from <<painless-api-reference-Exception,Exception>>, <<painless-api-reference-Object,Object>>
-
- ArrayDeque
-
-
[[painless-api-reference-ArrayDeque-ArrayDeque-0]]link:{java8-javadoc}/java/util/ArrayDeque.html#ArrayDeque%2D%2D[ArrayDeque]() (java 9)
-
[[painless-api-reference-ArrayDeque-ArrayDeque-1]]link:{java8-javadoc}/java/util/ArrayDeque.html#ArrayDeque%2Djava.util.Collection%2D[ArrayDeque](<<painless-api-reference-Collection,Collection>>) (java 9)
-
[[painless-api-reference-ArrayDeque-clone-0]]<<painless-api-reference-ArrayDeque,ArrayDeque>> link:{java8-javadoc}/java/util/ArrayDeque.html#clone%2D%2D[clone]() (java 9)
-
Inherits methods from <<painless-api-reference-Collection,Collection>>, <<painless-api-reference-Deque,Deque>>, <<painless-api-reference-Iterable,Iterable>>, <<painless-api-reference-Object,Object>>, <<painless-api-reference-Queue,Queue>>
-
- ArrayIndexOutOfBoundsException
-
-
[[painless-api-reference-ArrayIndexOutOfBoundsException-ArrayIndexOutOfBoundsException-0]]link:{java8-javadoc}/java/lang/ArrayIndexOutOfBoundsException.html#ArrayIndexOutOfBoundsException%2D%2D[ArrayIndexOutOfBoundsException]() (java 9)
-
[[painless-api-reference-ArrayIndexOutOfBoundsException-ArrayIndexOutOfBoundsException-1]]link:{java8-javadoc}/java/lang/ArrayIndexOutOfBoundsException.html#ArrayIndexOutOfBoundsException%2Djava.lang.String%2D[ArrayIndexOutOfBoundsException](<<painless-api-reference-String,String>>) (java 9)
-
Inherits methods from <<painless-api-reference-Exception,Exception>>, <<painless-api-reference-Object,Object>>
-
- ArrayList
-
-
[[painless-api-reference-ArrayList-ArrayList-0]]link:{java8-javadoc}/java/util/ArrayList.html#ArrayList%2D%2D[ArrayList]() (java 9)
-
[[painless-api-reference-ArrayList-ArrayList-1]]link:{java8-javadoc}/java/util/ArrayList.html#ArrayList%2Djava.util.Collection%2D[ArrayList](<<painless-api-reference-Collection,Collection>>) (java 9)
-
[[painless-api-reference-ArrayList-clone-0]]def link:{java8-javadoc}/java/util/ArrayList.html#clone%2D%2D[clone]() (java 9)
-
[[painless-api-reference-ArrayList-trimToSize-0]]void link:{java8-javadoc}/java/util/ArrayList.html#trimToSize%2D%2D[trimToSize]() (java 9)
-
Inherits methods from <<painless-api-reference-Collection,Collection>>, <<painless-api-reference-Iterable,Iterable>>, <<painless-api-reference-List,List>>, <<painless-api-reference-Object,Object>>
-
- ArrayStoreException
-
-
[[painless-api-reference-ArrayStoreException-ArrayStoreException-0]]link:{java8-javadoc}/java/lang/ArrayStoreException.html#ArrayStoreException%2D%2D[ArrayStoreException]() (java 9)
-
[[painless-api-reference-ArrayStoreException-ArrayStoreException-1]]link:{java8-javadoc}/java/lang/ArrayStoreException.html#ArrayStoreException%2Djava.lang.String%2D[ArrayStoreException](<<painless-api-reference-String,String>>) (java 9)
-
Inherits methods from <<painless-api-reference-Exception,Exception>>, <<painless-api-reference-Object,Object>>
-
- Arrays
-
-
[[painless-api-reference-Arrays-asList-1]]static <<painless-api-reference-List,List>> link:{java8-javadoc}/java/util/Arrays.html#asList%2Djava.lang.Object:A%2D[asList](<<painless-api-reference-Object,Object>>[]) (java 9)
-
[[painless-api-reference-Arrays-deepEquals-2]]static boolean link:{java8-javadoc}/java/util/Arrays.html#deepEquals%2Djava.lang.Object:A%2Djava.lang.Object:A%2D[deepEquals](<<painless-api-reference-Object,Object>>[], <<painless-api-reference-Object,Object>>[]) (java 9)
-
[[painless-api-reference-Arrays-deepHashCode-1]]static int link:{java8-javadoc}/java/util/Arrays.html#deepHashCode%2Djava.lang.Object:A%2D[deepHashCode](<<painless-api-reference-Object,Object>>[]) (java 9)
-
[[painless-api-reference-Arrays-deepToString-1]]static <<painless-api-reference-String,String>> link:{java8-javadoc}/java/util/Arrays.html#deepToString%2Djava.lang.Object:A%2D[deepToString](<<painless-api-reference-Object,Object>>[]) (java 9)
-
Inherits methods from <<painless-api-reference-Object,Object>>
-
- AttributedCharacterIterator
-
-
[[painless-api-reference-AttributedCharacterIterator-getAllAttributeKeys-0]]<<painless-api-reference-Set,Set>> link:{java8-javadoc}/java/text/AttributedCharacterIterator.html#getAllAttributeKeys%2D%2D[getAllAttributeKeys]() (java 9)
-
[[painless-api-reference-AttributedCharacterIterator-getAttribute-1]]def link:{java8-javadoc}/java/text/AttributedCharacterIterator.html#getAttribute%2Djava.text.AttributedCharacterIterator$Attribute%2D[getAttribute](<<painless-api-reference-AttributedCharacterIterator-Attribute,AttributedCharacterIterator.Attribute>>) (java 9)
-
[[painless-api-reference-AttributedCharacterIterator-getAttributes-0]]<<painless-api-reference-Map,Map>> link:{java8-javadoc}/java/text/AttributedCharacterIterator.html#getAttributes%2D%2D[getAttributes]() (java 9)
-
[[painless-api-reference-AttributedCharacterIterator-getRunLimit-0]]int link:{java8-javadoc}/java/text/AttributedCharacterIterator.html#getRunLimit%2D%2D[getRunLimit]() (java 9)
-
[[painless-api-reference-AttributedCharacterIterator-getRunLimit-1]]int link:{java8-javadoc}/java/text/AttributedCharacterIterator.html#getRunLimit%2Djava.util.Set%2D[getRunLimit](<<painless-api-reference-Set,Set>>) (java 9)
-
[[painless-api-reference-AttributedCharacterIterator-getRunStart-0]]int link:{java8-javadoc}/java/text/AttributedCharacterIterator.html#getRunStart%2D%2D[getRunStart]() (java 9)
-
[[painless-api-reference-AttributedCharacterIterator-getRunStart-1]]int link:{java8-javadoc}/java/text/AttributedCharacterIterator.html#getRunStart%2Djava.util.Set%2D[getRunStart](<<painless-api-reference-Set,Set>>) (java 9)
-
Inherits methods from <<painless-api-reference-CharacterIterator,CharacterIterator>>, <<painless-api-reference-Object,Object>>
-
- AttributedCharacterIterator.Attribute
-
-
static AttributedCharacterIterator.Attribute INPUT_METHOD_SEGMENT (java 9)
-
static AttributedCharacterIterator.Attribute LANGUAGE (java 9)
-
static AttributedCharacterIterator.Attribute READING (java 9)
-
Inherits methods from <<painless-api-reference-Object,Object>>
-
-
- AttributedString
-
-
[[painless-api-reference-AttributedString-AttributedString-1]]link:{java8-javadoc}/java/text/AttributedString.html#AttributedString%2Djava.lang.String%2D[AttributedString](<<painless-api-reference-String,String>>) (java 9)
-
[[painless-api-reference-AttributedString-AttributedString-2]]link:{java8-javadoc}/java/text/AttributedString.html#AttributedString%2Djava.lang.String%2Djava.util.Map%2D[AttributedString](<<painless-api-reference-String,String>>, <<painless-api-reference-Map,Map>>) (java 9)
-
[[painless-api-reference-AttributedString-addAttribute-2]]void link:{java8-javadoc}/java/text/AttributedString.html#addAttribute%2Djava.text.AttributedCharacterIterator$Attribute%2Djava.lang.Object%2D[addAttribute](<<painless-api-reference-AttributedCharacterIterator-Attribute,AttributedCharacterIterator.Attribute>>, <<painless-api-reference-Object,Object>>) (java 9)
-
[[painless-api-reference-AttributedString-addAttribute-4]]void link:{java8-javadoc}/java/text/AttributedString.html#addAttribute%2Djava.text.AttributedCharacterIterator$Attribute%2Djava.lang.Object%2Dint%2Dint%2D[addAttribute](<<painless-api-reference-AttributedCharacterIterator-Attribute,AttributedCharacterIterator.Attribute>>, <<painless-api-reference-Object,Object>>, int, int) (java 9)
-
[[painless-api-reference-AttributedString-addAttributes-3]]void link:{java8-javadoc}/java/text/AttributedString.html#addAttributes%2Djava.util.Map%2Dint%2Dint%2D[addAttributes](<<painless-api-reference-Map,Map>>, int, int) (java 9)
-
[[painless-api-reference-AttributedString-getIterator-0]]<<painless-api-reference-AttributedCharacterIterator,AttributedCharacterIterator>> link:{java8-javadoc}/java/text/AttributedString.html#getIterator%2D%2D[getIterator]() (java 9)
-
[[painless-api-reference-AttributedString-getIterator-1]]<<painless-api-reference-AttributedCharacterIterator,AttributedCharacterIterator>> link:{java8-javadoc}/java/text/AttributedString.html#getIterator%2Djava.text.AttributedCharacterIterator$Attribute:A%2D[getIterator](<<painless-api-reference-AttributedCharacterIterator-Attribute,AttributedCharacterIterator.Attribute>>[]) (java 9)
-
[[painless-api-reference-AttributedString-getIterator-3]]<<painless-api-reference-AttributedCharacterIterator,AttributedCharacterIterator>> link:{java8-javadoc}/java/text/AttributedString.html#getIterator%2Djava.text.AttributedCharacterIterator$Attribute:A%2Dint%2Dint%2D[getIterator](<<painless-api-reference-AttributedCharacterIterator-Attribute,AttributedCharacterIterator.Attribute>>[], int, int) (java 9)
-
Inherits methods from <<painless-api-reference-Object,Object>>
-
- Base64
-
-
[[painless-api-reference-Base64-getDecoder-0]]static <<painless-api-reference-Base64-Decoder,Base64.Decoder>> link:{java8-javadoc}/java/util/Base64.html#getDecoder%2D%2D[getDecoder]() (java 9)
-
[[painless-api-reference-Base64-getEncoder-0]]static <<painless-api-reference-Base64-Encoder,Base64.Encoder>> link:{java8-javadoc}/java/util/Base64.html#getEncoder%2D%2D[getEncoder]() (java 9)
-
[[painless-api-reference-Base64-getMimeDecoder-0]]static <<painless-api-reference-Base64-Decoder,Base64.Decoder>> link:{java8-javadoc}/java/util/Base64.html#getMimeDecoder%2D%2D[getMimeDecoder]() (java 9)
-
[[painless-api-reference-Base64-getMimeEncoder-0]]static <<painless-api-reference-Base64-Encoder,Base64.Encoder>> link:{java8-javadoc}/java/util/Base64.html#getMimeEncoder%2D%2D[getMimeEncoder]() (java 9)
-
[[painless-api-reference-Base64-getMimeEncoder-2]]static <<painless-api-reference-Base64-Encoder,Base64.Encoder>> link:{java8-javadoc}/java/util/Base64.html#getMimeEncoder%2Dint%2Dbyte:A%2D[getMimeEncoder](int, byte[]) (java 9)
-
[[painless-api-reference-Base64-getUrlDecoder-0]]static <<painless-api-reference-Base64-Decoder,Base64.Decoder>> link:{java8-javadoc}/java/util/Base64.html#getUrlDecoder%2D%2D[getUrlDecoder]() (java 9)
-
[[painless-api-reference-Base64-getUrlEncoder-0]]static <<painless-api-reference-Base64-Encoder,Base64.Encoder>> link:{java8-javadoc}/java/util/Base64.html#getUrlEncoder%2D%2D[getUrlEncoder]() (java 9)
-
Inherits methods from <<painless-api-reference-Object,Object>>
-
- Base64.Decoder
-
-
[[painless-api-reference-Base64-Decoder-decode-1]]byte[] link:{java8-javadoc}/java/util/Base64.Decoder.html#decode%2Djava.lang.String%2D[decode](<<painless-api-reference-String,String>>) (java 9)
-
[[painless-api-reference-Base64-Decoder-decode-2]]int link:{java8-javadoc}/java/util/Base64.Decoder.html#decode%2Dbyte:A%2Dbyte:A%2D[decode](byte[], byte[]) (java 9)
-
Inherits methods from <<painless-api-reference-Object,Object>>
-
- Base64.Encoder
-
-
[[painless-api-reference-Base64-Encoder-encode-2]]int link:{java8-javadoc}/java/util/Base64.Encoder.html#encode%2Dbyte:A%2Dbyte:A%2D[encode](byte[], byte[]) (java 9)
-
[[painless-api-reference-Base64-Encoder-encodeToString-1]]<<painless-api-reference-String,String>> link:{java8-javadoc}/java/util/Base64.Encoder.html#encodeToString%2Dbyte:A%2D[encodeToString](byte[]) (java 9)
-
[[painless-api-reference-Base64-Encoder-withoutPadding-0]]<<painless-api-reference-Base64-Encoder,Base64.Encoder>> link:{java8-javadoc}/java/util/Base64.Encoder.html#withoutPadding%2D%2D[withoutPadding]() (java 9)
-
Inherits methods from <<painless-api-reference-Object,Object>>
-
- BaseStream
-
-
[[painless-api-reference-BaseStream-close-0]]void link:{java8-javadoc}/java/util/stream/BaseStream.html#close%2D%2D[close]() (java 9)
-
[[painless-api-reference-BaseStream-isParallel-0]]boolean link:{java8-javadoc}/java/util/stream/BaseStream.html#isParallel%2D%2D[isParallel]() (java 9)
-
[[painless-api-reference-BaseStream-iterator-0]]<<painless-api-reference-Iterator,Iterator>> link:{java8-javadoc}/java/util/stream/BaseStream.html#iterator%2D%2D[iterator]() (java 9)
-
[[painless-api-reference-BaseStream-sequential-0]]<<painless-api-reference-BaseStream,BaseStream>> link:{java8-javadoc}/java/util/stream/BaseStream.html#sequential%2D%2D[sequential]() (java 9)
-
[[painless-api-reference-BaseStream-spliterator-0]]<<painless-api-reference-Spliterator,Spliterator>> link:{java8-javadoc}/java/util/stream/BaseStream.html#spliterator%2D%2D[spliterator]() (java 9)
-
[[painless-api-reference-BaseStream-unordered-0]]<<painless-api-reference-BaseStream,BaseStream>> link:{java8-javadoc}/java/util/stream/BaseStream.html#unordered%2D%2D[unordered]() (java 9)
-
Inherits methods from <<painless-api-reference-Object,Object>>
-
- BiConsumer
-
-
[[painless-api-reference-BiConsumer-accept-2]]void link:{java8-javadoc}/java/util/function/BiConsumer.html#accept%2Djava.lang.Object%2Djava.lang.Object%2D[accept](def, def) (java 9)
-
[[painless-api-reference-BiConsumer-andThen-1]]<<painless-api-reference-BiConsumer,BiConsumer>> link:{java8-javadoc}/java/util/function/BiConsumer.html#andThen%2Djava.util.function.BiConsumer%2D[andThen](<<painless-api-reference-BiConsumer,BiConsumer>>) (java 9)
-
Inherits methods from <<painless-api-reference-Object,Object>>
-
- BiFunction
-
-
[[painless-api-reference-BiFunction-andThen-1]]<<painless-api-reference-BiFunction,BiFunction>> link:{java8-javadoc}/java/util/function/BiFunction.html#andThen%2Djava.util.function.Function%2D[andThen](<<painless-api-reference-Function,Function>>) (java 9)
-
[[painless-api-reference-BiFunction-apply-2]]def link:{java8-javadoc}/java/util/function/BiFunction.html#apply%2Djava.lang.Object%2Djava.lang.Object%2D[apply](def, def) (java 9)
-
Inherits methods from <<painless-api-reference-Object,Object>>
-
- BiPredicate
-
-
[[painless-api-reference-BiPredicate-and-1]]<<painless-api-reference-BiPredicate,BiPredicate>> link:{java8-javadoc}/java/util/function/BiPredicate.html#and%2Djava.util.function.BiPredicate%2D[and](<<painless-api-reference-BiPredicate,BiPredicate>>) (java 9)
-
[[painless-api-reference-BiPredicate-negate-0]]<<painless-api-reference-BiPredicate,BiPredicate>> link:{java8-javadoc}/java/util/function/BiPredicate.html#negate%2D%2D[negate]() (java 9)
-
[[painless-api-reference-BiPredicate-or-1]]<<painless-api-reference-BiPredicate,BiPredicate>> link:{java8-javadoc}/java/util/function/BiPredicate.html#or%2Djava.util.function.BiPredicate%2D[or](<<painless-api-reference-BiPredicate,BiPredicate>>) (java 9)
-
[[painless-api-reference-BiPredicate-test-2]]boolean link:{java8-javadoc}/java/util/function/BiPredicate.html#test%2Djava.lang.Object%2Djava.lang.Object%2D[test](def, def) (java 9)
-
Inherits methods from <<painless-api-reference-Object,Object>>
-
- Bidi
-
-
static int DIRECTION_DEFAULT_LEFT_TO_RIGHT (java 9)
-
static int DIRECTION_DEFAULT_RIGHT_TO_LEFT (java 9)
-
static int DIRECTION_LEFT_TO_RIGHT (java 9)
-
static int DIRECTION_RIGHT_TO_LEFT (java 9)
-
[[painless-api-reference-Bidi-reorderVisually-5]]static void link:{java8-javadoc}/java/text/Bidi.html#reorderVisually%2Dbyte:A%2Dint%2Djava.lang.Object:A%2Dint%2Dint%2D[reorderVisually](byte[], int, <<painless-api-reference-Object,Object>>[], int, int) (java 9)
-
[[painless-api-reference-Bidi-requiresBidi-3]]static boolean link:{java8-javadoc}/java/text/Bidi.html#requiresBidi%2Dchar:A%2Dint%2Dint%2D[requiresBidi](char[], int, int) (java 9)
-
[[painless-api-reference-Bidi-Bidi-1]]link:{java8-javadoc}/java/text/Bidi.html#Bidi%2Djava.text.AttributedCharacterIterator%2D[Bidi](<<painless-api-reference-AttributedCharacterIterator,AttributedCharacterIterator>>) (java 9)
-
[[painless-api-reference-Bidi-Bidi-2]]link:{java8-javadoc}/java/text/Bidi.html#Bidi%2Djava.lang.String%2Dint%2D[Bidi](<<painless-api-reference-String,String>>, int) (java 9)
-
[[painless-api-reference-Bidi-Bidi-6]]link:{java8-javadoc}/java/text/Bidi.html#Bidi%2Dchar:A%2Dint%2Dbyte:A%2Dint%2Dint%2Dint%2D[Bidi](char[], int, byte[], int, int, int) (java 9)
-
[[painless-api-reference-Bidi-baseIsLeftToRight-0]]boolean link:{java8-javadoc}/java/text/Bidi.html#baseIsLeftToRight%2D%2D[baseIsLeftToRight]() (java 9)
-
[[painless-api-reference-Bidi-createLineBidi-2]]<<painless-api-reference-Bidi,Bidi>> link:{java8-javadoc}/java/text/Bidi.html#createLineBidi%2Dint%2Dint%2D[createLineBidi](int, int) (java 9)
-
[[painless-api-reference-Bidi-getBaseLevel-0]]int link:{java8-javadoc}/java/text/Bidi.html#getBaseLevel%2D%2D[getBaseLevel]() (java 9)
-
[[painless-api-reference-Bidi-getLength-0]]int link:{java8-javadoc}/java/text/Bidi.html#getLength%2D%2D[getLength]() (java 9)
-
[[painless-api-reference-Bidi-getLevelAt-1]]int link:{java8-javadoc}/java/text/Bidi.html#getLevelAt%2Dint%2D[getLevelAt](int) (java 9)
-
[[painless-api-reference-Bidi-getRunCount-0]]int link:{java8-javadoc}/java/text/Bidi.html#getRunCount%2D%2D[getRunCount]() (java 9)
-
[[painless-api-reference-Bidi-getRunLevel-1]]int link:{java8-javadoc}/java/text/Bidi.html#getRunLevel%2Dint%2D[getRunLevel](int) (java 9)
-
[[painless-api-reference-Bidi-getRunLimit-1]]int link:{java8-javadoc}/java/text/Bidi.html#getRunLimit%2Dint%2D[getRunLimit](int) (java 9)
-
[[painless-api-reference-Bidi-getRunStart-1]]int link:{java8-javadoc}/java/text/Bidi.html#getRunStart%2Dint%2D[getRunStart](int) (java 9)
-
[[painless-api-reference-Bidi-isLeftToRight-0]]boolean link:{java8-javadoc}/java/text/Bidi.html#isLeftToRight%2D%2D[isLeftToRight]() (java 9)
-
[[painless-api-reference-Bidi-isMixed-0]]boolean link:{java8-javadoc}/java/text/Bidi.html#isMixed%2D%2D[isMixed]() (java 9)
-
[[painless-api-reference-Bidi-isRightToLeft-0]]boolean link:{java8-javadoc}/java/text/Bidi.html#isRightToLeft%2D%2D[isRightToLeft]() (java 9)
-
Inherits methods from <<painless-api-reference-Object,Object>>
-
-
- BigDecimal
-
-
static BigDecimal ONE (java 9)
-
static BigDecimal TEN (java 9)
-
static BigDecimal ZERO (java 9)
-
[[painless-api-reference-BigDecimal-valueOf-1]]static <<painless-api-reference-BigDecimal,BigDecimal>> link:{java8-javadoc}/java/math/BigDecimal.html#valueOf%2Ddouble%2D[valueOf](double) (java 9)
-
[[painless-api-reference-BigDecimal-BigDecimal-1]]link:{java8-javadoc}/java/math/BigDecimal.html#BigDecimal%2Djava.lang.String%2D[BigDecimal](<<painless-api-reference-String,String>>) (java 9)
-
[[painless-api-reference-BigDecimal-BigDecimal-2]]link:{java8-javadoc}/java/math/BigDecimal.html#BigDecimal%2Djava.lang.String%2Djava.math.MathContext%2D[BigDecimal](<<painless-api-reference-String,String>>, <<painless-api-reference-MathContext,MathContext>>) (java 9)
-
[[painless-api-reference-BigDecimal-abs-0]]<<painless-api-reference-BigDecimal,BigDecimal>> link:{java8-javadoc}/java/math/BigDecimal.html#abs%2D%2D[abs]() (java 9)
-
[[painless-api-reference-BigDecimal-abs-1]]<<painless-api-reference-BigDecimal,BigDecimal>> link:{java8-javadoc}/java/math/BigDecimal.html#abs%2Djava.math.MathContext%2D[abs](<<painless-api-reference-MathContext,MathContext>>) (java 9)
-
[[painless-api-reference-BigDecimal-add-1]]<<painless-api-reference-BigDecimal,BigDecimal>> link:{java8-javadoc}/java/math/BigDecimal.html#add%2Djava.math.BigDecimal%2D[add](<<painless-api-reference-BigDecimal,BigDecimal>>) (java 9)
-
[[painless-api-reference-BigDecimal-add-2]]<<painless-api-reference-BigDecimal,BigDecimal>> link:{java8-javadoc}/java/math/BigDecimal.html#add%2Djava.math.BigDecimal%2Djava.math.MathContext%2D[add](<<painless-api-reference-BigDecimal,BigDecimal>>, <<painless-api-reference-MathContext,MathContext>>) (java 9)
-
[[painless-api-reference-BigDecimal-byteValueExact-0]]byte link:{java8-javadoc}/java/math/BigDecimal.html#byteValueExact%2D%2D[byteValueExact]() (java 9)
-
[[painless-api-reference-BigDecimal-compareTo-1]]int link:{java8-javadoc}/java/math/BigDecimal.html#compareTo%2Djava.math.BigDecimal%2D[compareTo](<<painless-api-reference-BigDecimal,BigDecimal>>) (java 9)
-
[[painless-api-reference-BigDecimal-divide-1]]<<painless-api-reference-BigDecimal,BigDecimal>> link:{java8-javadoc}/java/math/BigDecimal.html#divide%2Djava.math.BigDecimal%2D[divide](<<painless-api-reference-BigDecimal,BigDecimal>>) (java 9)
-
[[painless-api-reference-BigDecimal-divide-2]]<<painless-api-reference-BigDecimal,BigDecimal>> link:{java8-javadoc}/java/math/BigDecimal.html#divide%2Djava.math.BigDecimal%2Djava.math.MathContext%2D[divide](<<painless-api-reference-BigDecimal,BigDecimal>>, <<painless-api-reference-MathContext,MathContext>>) (java 9)
-
[[painless-api-reference-BigDecimal-divideAndRemainder-1]]<<painless-api-reference-BigDecimal,BigDecimal>>[] link:{java8-javadoc}/java/math/BigDecimal.html#divideAndRemainder%2Djava.math.BigDecimal%2D[divideAndRemainder](<<painless-api-reference-BigDecimal,BigDecimal>>) (java 9)
-
[[painless-api-reference-BigDecimal-divideAndRemainder-2]]<<painless-api-reference-BigDecimal,BigDecimal>>[] link:{java8-javadoc}/java/math/BigDecimal.html#divideAndRemainder%2Djava.math.BigDecimal%2Djava.math.MathContext%2D[divideAndRemainder](<<painless-api-reference-BigDecimal,BigDecimal>>, <<painless-api-reference-MathContext,MathContext>>) (java 9)
-
[[painless-api-reference-BigDecimal-divideToIntegralValue-1]]<<painless-api-reference-BigDecimal,BigDecimal>> link:{java8-javadoc}/java/math/BigDecimal.html#divideToIntegralValue%2Djava.math.BigDecimal%2D[divideToIntegralValue](<<painless-api-reference-BigDecimal,BigDecimal>>) (java 9)
-
[[painless-api-reference-BigDecimal-divideToIntegralValue-2]]<<painless-api-reference-BigDecimal,BigDecimal>> link:{java8-javadoc}/java/math/BigDecimal.html#divideToIntegralValue%2Djava.math.BigDecimal%2Djava.math.MathContext%2D[divideToIntegralValue](<<painless-api-reference-BigDecimal,BigDecimal>>, <<painless-api-reference-MathContext,MathContext>>) (java 9)
-
[[painless-api-reference-BigDecimal-intValueExact-0]]int link:{java8-javadoc}/java/math/BigDecimal.html#intValueExact%2D%2D[intValueExact]() (java 9)
-
[[painless-api-reference-BigDecimal-longValueExact-0]]long link:{java8-javadoc}/java/math/BigDecimal.html#longValueExact%2D%2D[longValueExact]() (java 9)
-
[[painless-api-reference-BigDecimal-max-1]]<<painless-api-reference-BigDecimal,BigDecimal>> link:{java8-javadoc}/java/math/BigDecimal.html#max%2Djava.math.BigDecimal%2D[max](<<painless-api-reference-BigDecimal,BigDecimal>>) (java 9)
-
[[painless-api-reference-BigDecimal-min-1]]<<painless-api-reference-BigDecimal,BigDecimal>> link:{java8-javadoc}/java/math/BigDecimal.html#min%2Djava.math.BigDecimal%2D[min](<<painless-api-reference-BigDecimal,BigDecimal>>) (java 9)
-
[[painless-api-reference-BigDecimal-movePointLeft-1]]<<painless-api-reference-BigDecimal,BigDecimal>> link:{java8-javadoc}/java/math/BigDecimal.html#movePointLeft%2Dint%2D[movePointLeft](int) (java 9)
-
[[painless-api-reference-BigDecimal-movePointRight-1]]<<painless-api-reference-BigDecimal,BigDecimal>> link:{java8-javadoc}/java/math/BigDecimal.html#movePointRight%2Dint%2D[movePointRight](int) (java 9)
-
[[painless-api-reference-BigDecimal-multiply-1]]<<painless-api-reference-BigDecimal,BigDecimal>> link:{java8-javadoc}/java/math/BigDecimal.html#multiply%2Djava.math.BigDecimal%2D[multiply](<<painless-api-reference-BigDecimal,BigDecimal>>) (java 9)
-
[[painless-api-reference-BigDecimal-multiply-2]]<<painless-api-reference-BigDecimal,BigDecimal>> link:{java8-javadoc}/java/math/BigDecimal.html#multiply%2Djava.math.BigDecimal%2Djava.math.MathContext%2D[multiply](<<painless-api-reference-BigDecimal,BigDecimal>>, <<painless-api-reference-MathContext,MathContext>>) (java 9)
-
[[painless-api-reference-BigDecimal-negate-0]]<<painless-api-reference-BigDecimal,BigDecimal>> link:{java8-javadoc}/java/math/BigDecimal.html#negate%2D%2D[negate]() (java 9)
-
[[painless-api-reference-BigDecimal-negate-1]]<<painless-api-reference-BigDecimal,BigDecimal>> link:{java8-javadoc}/java/math/BigDecimal.html#negate%2Djava.math.MathContext%2D[negate](<<painless-api-reference-MathContext,MathContext>>) (java 9)
-
[[painless-api-reference-BigDecimal-plus-0]]<<painless-api-reference-BigDecimal,BigDecimal>> link:{java8-javadoc}/java/math/BigDecimal.html#plus%2D%2D[plus]() (java 9)
-
[[painless-api-reference-BigDecimal-plus-1]]<<painless-api-reference-BigDecimal,BigDecimal>> link:{java8-javadoc}/java/math/BigDecimal.html#plus%2Djava.math.MathContext%2D[plus](<<painless-api-reference-MathContext,MathContext>>) (java 9)
-
[[painless-api-reference-BigDecimal-pow-1]]<<painless-api-reference-BigDecimal,BigDecimal>> link:{java8-javadoc}/java/math/BigDecimal.html#pow%2Dint%2D[pow](int) (java 9)
-
[[painless-api-reference-BigDecimal-pow-2]]<<painless-api-reference-BigDecimal,BigDecimal>> link:{java8-javadoc}/java/math/BigDecimal.html#pow%2Dint%2Djava.math.MathContext%2D[pow](int, <<painless-api-reference-MathContext,MathContext>>) (java 9)
-
[[painless-api-reference-BigDecimal-precision-0]]int link:{java8-javadoc}/java/math/BigDecimal.html#precision%2D%2D[precision]() (java 9)
-
[[painless-api-reference-BigDecimal-remainder-1]]<<painless-api-reference-BigDecimal,BigDecimal>> link:{java8-javadoc}/java/math/BigDecimal.html#remainder%2Djava.math.BigDecimal%2D[remainder](<<painless-api-reference-BigDecimal,BigDecimal>>) (java 9)
-
[[painless-api-reference-BigDecimal-remainder-2]]<<painless-api-reference-BigDecimal,BigDecimal>> link:{java8-javadoc}/java/math/BigDecimal.html#remainder%2Djava.math.BigDecimal%2Djava.math.MathContext%2D[remainder](<<painless-api-reference-BigDecimal,BigDecimal>>, <<painless-api-reference-MathContext,MathContext>>) (java 9)
-
[[painless-api-reference-BigDecimal-round-1]]<<painless-api-reference-BigDecimal,BigDecimal>> link:{java8-javadoc}/java/math/BigDecimal.html#round%2Djava.math.MathContext%2D[round](<<painless-api-reference-MathContext,MathContext>>) (java 9)
-
[[painless-api-reference-BigDecimal-scale-0]]int link:{java8-javadoc}/java/math/BigDecimal.html#scale%2D%2D[scale]() (java 9)
-
[[painless-api-reference-BigDecimal-scaleByPowerOfTen-1]]<<painless-api-reference-BigDecimal,BigDecimal>> link:{java8-javadoc}/java/math/BigDecimal.html#scaleByPowerOfTen%2Dint%2D[scaleByPowerOfTen](int) (java 9)
-
[[painless-api-reference-BigDecimal-setScale-1]]<<painless-api-reference-BigDecimal,BigDecimal>> link:{java8-javadoc}/java/math/BigDecimal.html#setScale%2Dint%2D[setScale](int) (java 9)
-
[[painless-api-reference-BigDecimal-setScale-2]]<<painless-api-reference-BigDecimal,BigDecimal>> link:{java8-javadoc}/java/math/BigDecimal.html#setScale%2Dint%2Djava.math.RoundingMode%2D[setScale](int, <<painless-api-reference-RoundingMode,RoundingMode>>) (java 9)
-
[[painless-api-reference-BigDecimal-shortValueExact-0]]short link:{java8-javadoc}/java/math/BigDecimal.html#shortValueExact%2D%2D[shortValueExact]() (java 9)
-
[[painless-api-reference-BigDecimal-signum-0]]int link:{java8-javadoc}/java/math/BigDecimal.html#signum%2D%2D[signum]() (java 9)
-
[[painless-api-reference-BigDecimal-stripTrailingZeros-0]]<<painless-api-reference-BigDecimal,BigDecimal>> link:{java8-javadoc}/java/math/BigDecimal.html#stripTrailingZeros%2D%2D[stripTrailingZeros]() (java 9)
-
[[painless-api-reference-BigDecimal-subtract-1]]<<painless-api-reference-BigDecimal,BigDecimal>> link:{java8-javadoc}/java/math/BigDecimal.html#subtract%2Djava.math.BigDecimal%2D[subtract](<<painless-api-reference-BigDecimal,BigDecimal>>) (java 9)
-
[[painless-api-reference-BigDecimal-subtract-2]]<<painless-api-reference-BigDecimal,BigDecimal>> link:{java8-javadoc}/java/math/BigDecimal.html#subtract%2Djava.math.BigDecimal%2Djava.math.MathContext%2D[subtract](<<painless-api-reference-BigDecimal,BigDecimal>>, <<painless-api-reference-MathContext,MathContext>>) (java 9)
-
[[painless-api-reference-BigDecimal-toBigInteger-0]]<<painless-api-reference-BigInteger,BigInteger>> link:{java8-javadoc}/java/math/BigDecimal.html#toBigInteger%2D%2D[toBigInteger]() (java 9)
-
[[painless-api-reference-BigDecimal-toBigIntegerExact-0]]<<painless-api-reference-BigInteger,BigInteger>> link:{java8-javadoc}/java/math/BigDecimal.html#toBigIntegerExact%2D%2D[toBigIntegerExact]() (java 9)
-
[[painless-api-reference-BigDecimal-toEngineeringString-0]]<<painless-api-reference-String,String>> link:{java8-javadoc}/java/math/BigDecimal.html#toEngineeringString%2D%2D[toEngineeringString]() (java 9)
-
[[painless-api-reference-BigDecimal-toPlainString-0]]<<painless-api-reference-String,String>> link:{java8-javadoc}/java/math/BigDecimal.html#toPlainString%2D%2D[toPlainString]() (java 9)
-
[[painless-api-reference-BigDecimal-ulp-0]]<<painless-api-reference-BigDecimal,BigDecimal>> link:{java8-javadoc}/java/math/BigDecimal.html#ulp%2D%2D[ulp]() (java 9)
-
Inherits methods from <<painless-api-reference-Number,Number>>, <<painless-api-reference-Object,Object>>
-
-
- BigInteger
-
-
static BigInteger ONE (java 9)
-
static BigInteger TEN (java 9)
-
static BigInteger ZERO (java 9)
-
[[painless-api-reference-BigInteger-valueOf-1]]static <<painless-api-reference-BigInteger,BigInteger>> link:{java8-javadoc}/java/math/BigInteger.html#valueOf%2Dlong%2D[valueOf](long) (java 9)
-
[[painless-api-reference-BigInteger-BigInteger-1]]link:{java8-javadoc}/java/math/BigInteger.html#BigInteger%2Djava.lang.String%2D[BigInteger](<<painless-api-reference-String,String>>) (java 9)
-
[[painless-api-reference-BigInteger-BigInteger-2]]link:{java8-javadoc}/java/math/BigInteger.html#BigInteger%2Djava.lang.String%2Dint%2D[BigInteger](<<painless-api-reference-String,String>>, int) (java 9)
-
[[painless-api-reference-BigInteger-abs-0]]<<painless-api-reference-BigInteger,BigInteger>> link:{java8-javadoc}/java/math/BigInteger.html#abs%2D%2D[abs]() (java 9)
-
[[painless-api-reference-BigInteger-add-1]]<<painless-api-reference-BigInteger,BigInteger>> link:{java8-javadoc}/java/math/BigInteger.html#add%2Djava.math.BigInteger%2D[add](<<painless-api-reference-BigInteger,BigInteger>>) (java 9)
-
[[painless-api-reference-BigInteger-and-1]]<<painless-api-reference-BigInteger,BigInteger>> link:{java8-javadoc}/java/math/BigInteger.html#and%2Djava.math.BigInteger%2D[and](<<painless-api-reference-BigInteger,BigInteger>>) (java 9)
-
[[painless-api-reference-BigInteger-andNot-1]]<<painless-api-reference-BigInteger,BigInteger>> link:{java8-javadoc}/java/math/BigInteger.html#andNot%2Djava.math.BigInteger%2D[andNot](<<painless-api-reference-BigInteger,BigInteger>>) (java 9)
-
[[painless-api-reference-BigInteger-bitCount-0]]int link:{java8-javadoc}/java/math/BigInteger.html#bitCount%2D%2D[bitCount]() (java 9)
-
[[painless-api-reference-BigInteger-bitLength-0]]int link:{java8-javadoc}/java/math/BigInteger.html#bitLength%2D%2D[bitLength]() (java 9)
-
[[painless-api-reference-BigInteger-byteValueExact-0]]byte link:{java8-javadoc}/java/math/BigInteger.html#byteValueExact%2D%2D[byteValueExact]() (java 9)
-
[[painless-api-reference-BigInteger-clearBit-1]]<<painless-api-reference-BigInteger,BigInteger>> link:{java8-javadoc}/java/math/BigInteger.html#clearBit%2Dint%2D[clearBit](int) (java 9)
-
[[painless-api-reference-BigInteger-compareTo-1]]int link:{java8-javadoc}/java/math/BigInteger.html#compareTo%2Djava.math.BigInteger%2D[compareTo](<<painless-api-reference-BigInteger,BigInteger>>) (java 9)
-
[[painless-api-reference-BigInteger-divide-1]]<<painless-api-reference-BigInteger,BigInteger>> link:{java8-javadoc}/java/math/BigInteger.html#divide%2Djava.math.BigInteger%2D[divide](<<painless-api-reference-BigInteger,BigInteger>>) (java 9)
-
[[painless-api-reference-BigInteger-divideAndRemainder-1]]<<painless-api-reference-BigInteger,BigInteger>>[] link:{java8-javadoc}/java/math/BigInteger.html#divideAndRemainder%2Djava.math.BigInteger%2D[divideAndRemainder](<<painless-api-reference-BigInteger,BigInteger>>) (java 9)
-
[[painless-api-reference-BigInteger-flipBit-1]]<<painless-api-reference-BigInteger,BigInteger>> link:{java8-javadoc}/java/math/BigInteger.html#flipBit%2Dint%2D[flipBit](int) (java 9)
-
[[painless-api-reference-BigInteger-gcd-1]]<<painless-api-reference-BigInteger,BigInteger>> link:{java8-javadoc}/java/math/BigInteger.html#gcd%2Djava.math.BigInteger%2D[gcd](<<painless-api-reference-BigInteger,BigInteger>>) (java 9)
-
[[painless-api-reference-BigInteger-getLowestSetBit-0]]int link:{java8-javadoc}/java/math/BigInteger.html#getLowestSetBit%2D%2D[getLowestSetBit]() (java 9)
-
[[painless-api-reference-BigInteger-intValueExact-0]]int link:{java8-javadoc}/java/math/BigInteger.html#intValueExact%2D%2D[intValueExact]() (java 9)
-
[[painless-api-reference-BigInteger-longValueExact-0]]long link:{java8-javadoc}/java/math/BigInteger.html#longValueExact%2D%2D[longValueExact]() (java 9)
-
[[painless-api-reference-BigInteger-max-1]]<<painless-api-reference-BigInteger,BigInteger>> link:{java8-javadoc}/java/math/BigInteger.html#max%2Djava.math.BigInteger%2D[max](<<painless-api-reference-BigInteger,BigInteger>>) (java 9)
-
[[painless-api-reference-BigInteger-min-1]]<<painless-api-reference-BigInteger,BigInteger>> link:{java8-javadoc}/java/math/BigInteger.html#min%2Djava.math.BigInteger%2D[min](<<painless-api-reference-BigInteger,BigInteger>>) (java 9)
-
[[painless-api-reference-BigInteger-mod-1]]<<painless-api-reference-BigInteger,BigInteger>> link:{java8-javadoc}/java/math/BigInteger.html#mod%2Djava.math.BigInteger%2D[mod](<<painless-api-reference-BigInteger,BigInteger>>) (java 9)
-
[[painless-api-reference-BigInteger-modInverse-1]]<<painless-api-reference-BigInteger,BigInteger>> link:{java8-javadoc}/java/math/BigInteger.html#modInverse%2Djava.math.BigInteger%2D[modInverse](<<painless-api-reference-BigInteger,BigInteger>>) (java 9)
-
[[painless-api-reference-BigInteger-modPow-2]]<<painless-api-reference-BigInteger,BigInteger>> link:{java8-javadoc}/java/math/BigInteger.html#modPow%2Djava.math.BigInteger%2Djava.math.BigInteger%2D[modPow](<<painless-api-reference-BigInteger,BigInteger>>, <<painless-api-reference-BigInteger,BigInteger>>) (java 9)
-
[[painless-api-reference-BigInteger-multiply-1]]<<painless-api-reference-BigInteger,BigInteger>> link:{java8-javadoc}/java/math/BigInteger.html#multiply%2Djava.math.BigInteger%2D[multiply](<<painless-api-reference-BigInteger,BigInteger>>) (java 9)
-
[[painless-api-reference-BigInteger-negate-0]]<<painless-api-reference-BigInteger,BigInteger>> link:{java8-javadoc}/java/math/BigInteger.html#negate%2D%2D[negate]() (java 9)
-
[[painless-api-reference-BigInteger-not-0]]<<painless-api-reference-BigInteger,BigInteger>> link:{java8-javadoc}/java/math/BigInteger.html#not%2D%2D[not]() (java 9)
-
[[painless-api-reference-BigInteger-or-1]]<<painless-api-reference-BigInteger,BigInteger>> link:{java8-javadoc}/java/math/BigInteger.html#or%2Djava.math.BigInteger%2D[or](<<painless-api-reference-BigInteger,BigInteger>>) (java 9)
-
[[painless-api-reference-BigInteger-pow-1]]<<painless-api-reference-BigInteger,BigInteger>> link:{java8-javadoc}/java/math/BigInteger.html#pow%2Dint%2D[pow](int) (java 9)
-
[[painless-api-reference-BigInteger-remainder-1]]<<painless-api-reference-BigInteger,BigInteger>> link:{java8-javadoc}/java/math/BigInteger.html#remainder%2Djava.math.BigInteger%2D[remainder](<<painless-api-reference-BigInteger,BigInteger>>) (java 9)
-
[[painless-api-reference-BigInteger-setBit-1]]<<painless-api-reference-BigInteger,BigInteger>> link:{java8-javadoc}/java/math/BigInteger.html#setBit%2Dint%2D[setBit](int) (java 9)
-
[[painless-api-reference-BigInteger-shiftLeft-1]]<<painless-api-reference-BigInteger,BigInteger>> link:{java8-javadoc}/java/math/BigInteger.html#shiftLeft%2Dint%2D[shiftLeft](int) (java 9)
-
[[painless-api-reference-BigInteger-shiftRight-1]]<<painless-api-reference-BigInteger,BigInteger>> link:{java8-javadoc}/java/math/BigInteger.html#shiftRight%2Dint%2D[shiftRight](int) (java 9)
-
[[painless-api-reference-BigInteger-shortValueExact-0]]short link:{java8-javadoc}/java/math/BigInteger.html#shortValueExact%2D%2D[shortValueExact]() (java 9)
-
[[painless-api-reference-BigInteger-signum-0]]int link:{java8-javadoc}/java/math/BigInteger.html#signum%2D%2D[signum]() (java 9)
-
[[painless-api-reference-BigInteger-subtract-1]]<<painless-api-reference-BigInteger,BigInteger>> link:{java8-javadoc}/java/math/BigInteger.html#subtract%2Djava.math.BigInteger%2D[subtract](<<painless-api-reference-BigInteger,BigInteger>>) (java 9)
-
[[painless-api-reference-BigInteger-testBit-1]]boolean link:{java8-javadoc}/java/math/BigInteger.html#testBit%2Dint%2D[testBit](int) (java 9)
-
[[painless-api-reference-BigInteger-toByteArray-0]]byte[] link:{java8-javadoc}/java/math/BigInteger.html#toByteArray%2D%2D[toByteArray]() (java 9)
-
[[painless-api-reference-BigInteger-toString-1]]<<painless-api-reference-String,String>> link:{java8-javadoc}/java/math/BigInteger.html#toString%2Dint%2D[toString](int) (java 9)
-
[[painless-api-reference-BigInteger-xor-1]]<<painless-api-reference-BigInteger,BigInteger>> link:{java8-javadoc}/java/math/BigInteger.html#xor%2Djava.math.BigInteger%2D[xor](<<painless-api-reference-BigInteger,BigInteger>>) (java 9)
-
Inherits methods from <<painless-api-reference-Number,Number>>, <<painless-api-reference-Object,Object>>
-
-
- BinaryOperator
-
-
[[painless-api-reference-BinaryOperator-maxBy-1]]static <<painless-api-reference-BinaryOperator,BinaryOperator>> link:{java8-javadoc}/java/util/function/BinaryOperator.html#maxBy%2Djava.util.Comparator%2D[maxBy](<<painless-api-reference-Comparator,Comparator>>) (java 9)
-
[[painless-api-reference-BinaryOperator-minBy-1]]static <<painless-api-reference-BinaryOperator,BinaryOperator>> link:{java8-javadoc}/java/util/function/BinaryOperator.html#minBy%2Djava.util.Comparator%2D[minBy](<<painless-api-reference-Comparator,Comparator>>) (java 9)
-
Inherits methods from <<painless-api-reference-BiFunction,BiFunction>>, <<painless-api-reference-Object,Object>>
-
- BitSet
-
-
[[painless-api-reference-BitSet-valueOf-1]]static <<painless-api-reference-BitSet,BitSet>> link:{java8-javadoc}/java/util/BitSet.html#valueOf%2Dlong:A%2D[valueOf](long[]) (java 9)
-
[[painless-api-reference-BitSet-BitSet-0]]link:{java8-javadoc}/java/util/BitSet.html#BitSet%2D%2D[BitSet]() (java 9)
-
[[painless-api-reference-BitSet-BitSet-1]]link:{java8-javadoc}/java/util/BitSet.html#BitSet%2Dint%2D[BitSet](int) (java 9)
-
[[painless-api-reference-BitSet-and-1]]void link:{java8-javadoc}/java/util/BitSet.html#and%2Djava.util.BitSet%2D[and](<<painless-api-reference-BitSet,BitSet>>) (java 9)
-
[[painless-api-reference-BitSet-andNot-1]]void link:{java8-javadoc}/java/util/BitSet.html#andNot%2Djava.util.BitSet%2D[andNot](<<painless-api-reference-BitSet,BitSet>>) (java 9)
-
[[painless-api-reference-BitSet-cardinality-0]]int link:{java8-javadoc}/java/util/BitSet.html#cardinality%2D%2D[cardinality]() (java 9)
-
[[painless-api-reference-BitSet-clear-0]]void link:{java8-javadoc}/java/util/BitSet.html#clear%2D%2D[clear]() (java 9)
-
[[painless-api-reference-BitSet-clear-1]]void link:{java8-javadoc}/java/util/BitSet.html#clear%2Dint%2D[clear](int) (java 9)
-
[[painless-api-reference-BitSet-clear-2]]void link:{java8-javadoc}/java/util/BitSet.html#clear%2Dint%2Dint%2D[clear](int, int) (java 9)
-
[[painless-api-reference-BitSet-clone-0]]def link:{java8-javadoc}/java/util/BitSet.html#clone%2D%2D[clone]() (java 9)
-
[[painless-api-reference-BitSet-flip-1]]void link:{java8-javadoc}/java/util/BitSet.html#flip%2Dint%2D[flip](int) (java 9)
-
[[painless-api-reference-BitSet-flip-2]]void link:{java8-javadoc}/java/util/BitSet.html#flip%2Dint%2Dint%2D[flip](int, int) (java 9)
-
[[painless-api-reference-BitSet-intersects-1]]boolean link:{java8-javadoc}/java/util/BitSet.html#intersects%2Djava.util.BitSet%2D[intersects](<<painless-api-reference-BitSet,BitSet>>) (java 9)
-
[[painless-api-reference-BitSet-isEmpty-0]]boolean link:{java8-javadoc}/java/util/BitSet.html#isEmpty%2D%2D[isEmpty]() (java 9)
-
[[painless-api-reference-BitSet-length-0]]int link:{java8-javadoc}/java/util/BitSet.html#length%2D%2D[length]() (java 9)
-
[[painless-api-reference-BitSet-nextClearBit-1]]int link:{java8-javadoc}/java/util/BitSet.html#nextClearBit%2Dint%2D[nextClearBit](int) (java 9)
-
[[painless-api-reference-BitSet-nextSetBit-1]]int link:{java8-javadoc}/java/util/BitSet.html#nextSetBit%2Dint%2D[nextSetBit](int) (java 9)
-
[[painless-api-reference-BitSet-or-1]]void link:{java8-javadoc}/java/util/BitSet.html#or%2Djava.util.BitSet%2D[or](<<painless-api-reference-BitSet,BitSet>>) (java 9)
-
[[painless-api-reference-BitSet-previousClearBit-1]]int link:{java8-javadoc}/java/util/BitSet.html#previousClearBit%2Dint%2D[previousClearBit](int) (java 9)
-
[[painless-api-reference-BitSet-previousSetBit-1]]int link:{java8-javadoc}/java/util/BitSet.html#previousSetBit%2Dint%2D[previousSetBit](int) (java 9)
-
[[painless-api-reference-BitSet-set-1]]void link:{java8-javadoc}/java/util/BitSet.html#set%2Dint%2D[set](int) (java 9)
-
[[painless-api-reference-BitSet-set-2]]void link:{java8-javadoc}/java/util/BitSet.html#set%2Dint%2Dint%2D[set](int, int) (java 9)
-
[[painless-api-reference-BitSet-set-3]]void link:{java8-javadoc}/java/util/BitSet.html#set%2Dint%2Dint%2Dboolean%2D[set](int, int, boolean) (java 9)
-
[[painless-api-reference-BitSet-size-0]]int link:{java8-javadoc}/java/util/BitSet.html#size%2D%2D[size]() (java 9)
-
[[painless-api-reference-BitSet-toByteArray-0]]byte[] link:{java8-javadoc}/java/util/BitSet.html#toByteArray%2D%2D[toByteArray]() (java 9)
-
[[painless-api-reference-BitSet-toLongArray-0]]long[] link:{java8-javadoc}/java/util/BitSet.html#toLongArray%2D%2D[toLongArray]() (java 9)
-
[[painless-api-reference-BitSet-xor-1]]void link:{java8-javadoc}/java/util/BitSet.html#xor%2Djava.util.BitSet%2D[xor](<<painless-api-reference-BitSet,BitSet>>) (java 9)
-
Inherits methods from <<painless-api-reference-Object,Object>>
-
- Boolean
-
-
-
[[painless-api-reference-Boolean-compare-2]]static int link:{java8-javadoc}/java/lang/Boolean.html#compare%2Dboolean%2Dboolean%2D[compare](boolean, boolean) (java 9)
-
[[painless-api-reference-Boolean-hashCode-1]]static int link:{java8-javadoc}/java/lang/Boolean.html#hashCode%2Dboolean%2D[hashCode](boolean) (java 9)
-
[[painless-api-reference-Boolean-logicalAnd-2]]static boolean link:{java8-javadoc}/java/lang/Boolean.html#logicalAnd%2Dboolean%2Dboolean%2D[logicalAnd](boolean, boolean) (java 9)
-
[[painless-api-reference-Boolean-logicalOr-2]]static boolean link:{java8-javadoc}/java/lang/Boolean.html#logicalOr%2Dboolean%2Dboolean%2D[logicalOr](boolean, boolean) (java 9)
-
[[painless-api-reference-Boolean-logicalXor-2]]static boolean link:{java8-javadoc}/java/lang/Boolean.html#logicalXor%2Dboolean%2Dboolean%2D[logicalXor](boolean, boolean) (java 9)
-
[[painless-api-reference-Boolean-parseBoolean-1]]static boolean link:{java8-javadoc}/java/lang/Boolean.html#parseBoolean%2Djava.lang.String%2D[parseBoolean](<<painless-api-reference-String,String>>) (java 9)
-
[[painless-api-reference-Boolean-toString-1]]static <<painless-api-reference-String,String>> link:{java8-javadoc}/java/lang/Boolean.html#toString%2Dboolean%2D[toString](boolean) (java 9)
-
[[painless-api-reference-Boolean-valueOf-1]]static <<painless-api-reference-Boolean,Boolean>> link:{java8-javadoc}/java/lang/Boolean.html#valueOf%2Dboolean%2D[valueOf](boolean) (java 9)
-
[[painless-api-reference-Boolean-booleanValue-0]]boolean link:{java8-javadoc}/java/lang/Boolean.html#booleanValue%2D%2D[booleanValue]() (java 9)
-
[[painless-api-reference-Boolean-compareTo-1]]int link:{java8-javadoc}/java/lang/Boolean.html#compareTo%2Djava.lang.Boolean%2D[compareTo](<<painless-api-reference-Boolean,Boolean>>) (java 9)
-
Inherits methods from <<painless-api-reference-Object,Object>>
-
- BooleanSupplier
-
-
[[painless-api-reference-BooleanSupplier-getAsBoolean-0]]boolean link:{java8-javadoc}/java/util/function/BooleanSupplier.html#getAsBoolean%2D%2D[getAsBoolean]() (java 9)
-
Inherits methods from <<painless-api-reference-Object,Object>>
-
- BreakIterator
-
-
-
[[painless-api-reference-BreakIterator-getAvailableLocales-0]]static <<painless-api-reference-Locale,Locale>>[] link:{java8-javadoc}/java/text/BreakIterator.html#getAvailableLocales%2D%2D[getAvailableLocales]() (java 9)
-
[[painless-api-reference-BreakIterator-getCharacterInstance-0]]static <<painless-api-reference-BreakIterator,BreakIterator>> link:{java8-javadoc}/java/text/BreakIterator.html#getCharacterInstance%2D%2D[getCharacterInstance]() (java 9)
-
[[painless-api-reference-BreakIterator-getCharacterInstance-1]]static <<painless-api-reference-BreakIterator,BreakIterator>> link:{java8-javadoc}/java/text/BreakIterator.html#getCharacterInstance%2Djava.util.Locale%2D[getCharacterInstance](<<painless-api-reference-Locale,Locale>>) (java 9)
-
[[painless-api-reference-BreakIterator-getLineInstance-0]]static <<painless-api-reference-BreakIterator,BreakIterator>> link:{java8-javadoc}/java/text/BreakIterator.html#getLineInstance%2D%2D[getLineInstance]() (java 9)
-
[[painless-api-reference-BreakIterator-getLineInstance-1]]static <<painless-api-reference-BreakIterator,BreakIterator>> link:{java8-javadoc}/java/text/BreakIterator.html#getLineInstance%2Djava.util.Locale%2D[getLineInstance](<<painless-api-reference-Locale,Locale>>) (java 9)
-
[[painless-api-reference-BreakIterator-getSentenceInstance-0]]static <<painless-api-reference-BreakIterator,BreakIterator>> link:{java8-javadoc}/java/text/BreakIterator.html#getSentenceInstance%2D%2D[getSentenceInstance]() (java 9)
-
[[painless-api-reference-BreakIterator-getSentenceInstance-1]]static <<painless-api-reference-BreakIterator,BreakIterator>> link:{java8-javadoc}/java/text/BreakIterator.html#getSentenceInstance%2Djava.util.Locale%2D[getSentenceInstance](<<painless-api-reference-Locale,Locale>>) (java 9)
-
[[painless-api-reference-BreakIterator-getWordInstance-0]]static <<painless-api-reference-BreakIterator,BreakIterator>> link:{java8-javadoc}/java/text/BreakIterator.html#getWordInstance%2D%2D[getWordInstance]() (java 9)
-
[[painless-api-reference-BreakIterator-getWordInstance-1]]static <<painless-api-reference-BreakIterator,BreakIterator>> link:{java8-javadoc}/java/text/BreakIterator.html#getWordInstance%2Djava.util.Locale%2D[getWordInstance](<<painless-api-reference-Locale,Locale>>) (java 9)
-
[[painless-api-reference-BreakIterator-clone-0]]def link:{java8-javadoc}/java/text/BreakIterator.html#clone%2D%2D[clone]() (java 9)
-
[[painless-api-reference-BreakIterator-current-0]]int link:{java8-javadoc}/java/text/BreakIterator.html#current%2D%2D[current]() (java 9)
-
[[painless-api-reference-BreakIterator-first-0]]int link:{java8-javadoc}/java/text/BreakIterator.html#first%2D%2D[first]() (java 9)
-
[[painless-api-reference-BreakIterator-following-1]]int link:{java8-javadoc}/java/text/BreakIterator.html#following%2Dint%2D[following](int) (java 9)
-
[[painless-api-reference-BreakIterator-getText-0]]<<painless-api-reference-CharacterIterator,CharacterIterator>> link:{java8-javadoc}/java/text/BreakIterator.html#getText%2D%2D[getText]() (java 9)
-
[[painless-api-reference-BreakIterator-isBoundary-1]]boolean link:{java8-javadoc}/java/text/BreakIterator.html#isBoundary%2Dint%2D[isBoundary](int) (java 9)
-
[[painless-api-reference-BreakIterator-last-0]]int link:{java8-javadoc}/java/text/BreakIterator.html#last%2D%2D[last]() (java 9)
-
[[painless-api-reference-BreakIterator-next-0]]int link:{java8-javadoc}/java/text/BreakIterator.html#next%2D%2D[next]() (java 9)
-
[[painless-api-reference-BreakIterator-next-1]]int link:{java8-javadoc}/java/text/BreakIterator.html#next%2Dint%2D[next](int) (java 9)
-
[[painless-api-reference-BreakIterator-preceding-1]]int link:{java8-javadoc}/java/text/BreakIterator.html#preceding%2Dint%2D[preceding](int) (java 9)
-
[[painless-api-reference-BreakIterator-previous-0]]int link:{java8-javadoc}/java/text/BreakIterator.html#previous%2D%2D[previous]() (java 9)
-
[[painless-api-reference-BreakIterator-setText-1]]void link:{java8-javadoc}/java/text/BreakIterator.html#setText%2Djava.lang.String%2D[setText](<<painless-api-reference-String,String>>) (java 9)
-
Inherits methods from <<painless-api-reference-Object,Object>>
-
-
- Byte
-
-
-
[[painless-api-reference-Byte-compare-2]]static int link:{java8-javadoc}/java/lang/Byte.html#compare%2Dbyte%2Dbyte%2D[compare](byte, byte) (java 9)
-
[[painless-api-reference-Byte-decode-1]]static <<painless-api-reference-Byte,Byte>> link:{java8-javadoc}/java/lang/Byte.html#decode%2Djava.lang.String%2D[decode](<<painless-api-reference-String,String>>) (java 9)
-
[[painless-api-reference-Byte-hashCode-1]]static int link:{java8-javadoc}/java/lang/Byte.html#hashCode%2Dbyte%2D[hashCode](byte) (java 9)
-
[[painless-api-reference-Byte-parseByte-1]]static byte link:{java8-javadoc}/java/lang/Byte.html#parseByte%2Djava.lang.String%2D[parseByte](<<painless-api-reference-String,String>>) (java 9)
-
[[painless-api-reference-Byte-parseByte-2]]static byte link:{java8-javadoc}/java/lang/Byte.html#parseByte%2Djava.lang.String%2Dint%2D[parseByte](<<painless-api-reference-String,String>>, int) (java 9)
-
[[painless-api-reference-Byte-toString-1]]static <<painless-api-reference-String,String>> link:{java8-javadoc}/java/lang/Byte.html#toString%2Dbyte%2D[toString](byte) (java 9)
-
[[painless-api-reference-Byte-toUnsignedInt-1]]static int link:{java8-javadoc}/java/lang/Byte.html#toUnsignedInt%2Dbyte%2D[toUnsignedInt](byte) (java 9)
-
[[painless-api-reference-Byte-toUnsignedLong-1]]static long link:{java8-javadoc}/java/lang/Byte.html#toUnsignedLong%2Dbyte%2D[toUnsignedLong](byte) (java 9)
-
[[painless-api-reference-Byte-valueOf-1]]static <<painless-api-reference-Byte,Byte>> link:{java8-javadoc}/java/lang/Byte.html#valueOf%2Dbyte%2D[valueOf](byte) (java 9)
-
[[painless-api-reference-Byte-valueOf-2]]static <<painless-api-reference-Byte,Byte>> link:{java8-javadoc}/java/lang/Byte.html#valueOf%2Djava.lang.String%2Dint%2D[valueOf](<<painless-api-reference-String,String>>, int) (java 9)
-
[[painless-api-reference-Byte-compareTo-1]]int link:{java8-javadoc}/java/lang/Byte.html#compareTo%2Djava.lang.Byte%2D[compareTo](<<painless-api-reference-Byte,Byte>>) (java 9)
-
Inherits methods from <<painless-api-reference-Number,Number>>, <<painless-api-reference-Object,Object>>
-
- BytesRef
-
-
byte[] bytes
-
int length
-
int offset
-
[[painless-api-reference-BytesRef-bytesEquals-1]]boolean link:{lucene-core-javadoc}/org/apache/lucene/util/BytesRef.html#bytesEquals%2Dorg.apache.lucene.util.BytesRef%2D[bytesEquals](<<painless-api-reference-BytesRef,BytesRef>>)
-
[[painless-api-reference-BytesRef-utf8ToString-0]]<<painless-api-reference-String,String>> link:{lucene-core-javadoc}/org/apache/lucene/util/BytesRef.html#utf8ToString%2D%2D[utf8ToString]()
-
Inherits methods from <<painless-api-reference-Object,Object>>
-
-
- Calendar
-
-
static int ALL_STYLES (java 9)
-
static int DAY_OF_MONTH (java 9)
-
static int DAY_OF_WEEK (java 9)
-
static int DAY_OF_WEEK_IN_MONTH (java 9)
-
static int DAY_OF_YEAR (java 9)
-
static int DST_OFFSET (java 9)
-
static int FIELD_COUNT (java 9)
-
static int HOUR_OF_DAY (java 9)
-
static int LONG_FORMAT (java 9)
-
static int LONG_STANDALONE (java 9)
-
static int MILLISECOND (java 9)
-
static int NARROW_FORMAT (java 9)
-
static int NARROW_STANDALONE (java 9)
-
static int SHORT_FORMAT (java 9)
-
static int SHORT_STANDALONE (java 9)
-
static int UNDECIMBER (java 9)
-
static int WEEK_OF_MONTH (java 9)
-
static int WEEK_OF_YEAR (java 9)
-
static int ZONE_OFFSET (java 9)
-
[[painless-api-reference-Calendar-getAvailableCalendarTypes-0]]static <<painless-api-reference-Set,Set>> link:{java8-javadoc}/java/util/Calendar.html#getAvailableCalendarTypes%2D%2D[getAvailableCalendarTypes]() (java 9)
-
[[painless-api-reference-Calendar-getAvailableLocales-0]]static <<painless-api-reference-Locale,Locale>>[] link:{java8-javadoc}/java/util/Calendar.html#getAvailableLocales%2D%2D[getAvailableLocales]() (java 9)
-
[[painless-api-reference-Calendar-getInstance-0]]static <<painless-api-reference-Calendar,Calendar>> link:{java8-javadoc}/java/util/Calendar.html#getInstance%2D%2D[getInstance]() (java 9)
-
[[painless-api-reference-Calendar-getInstance-1]]static <<painless-api-reference-Calendar,Calendar>> link:{java8-javadoc}/java/util/Calendar.html#getInstance%2Djava.util.TimeZone%2D[getInstance](<<painless-api-reference-TimeZone,TimeZone>>) (java 9)
-
[[painless-api-reference-Calendar-getInstance-2]]static <<painless-api-reference-Calendar,Calendar>> link:{java8-javadoc}/java/util/Calendar.html#getInstance%2Djava.util.TimeZone%2Djava.util.Locale%2D[getInstance](<<painless-api-reference-TimeZone,TimeZone>>, <<painless-api-reference-Locale,Locale>>) (java 9)
-
[[painless-api-reference-Calendar-add-2]]void link:{java8-javadoc}/java/util/Calendar.html#add%2Dint%2Dint%2D[add](int, int) (java 9)
-
[[painless-api-reference-Calendar-after-1]]boolean link:{java8-javadoc}/java/util/Calendar.html#after%2Djava.lang.Object%2D[after](<<painless-api-reference-Object,Object>>) (java 9)
-
[[painless-api-reference-Calendar-before-1]]boolean link:{java8-javadoc}/java/util/Calendar.html#before%2Djava.lang.Object%2D[before](<<painless-api-reference-Object,Object>>) (java 9)
-
[[painless-api-reference-Calendar-clear-0]]void link:{java8-javadoc}/java/util/Calendar.html#clear%2D%2D[clear]() (java 9)
-
[[painless-api-reference-Calendar-clear-1]]void link:{java8-javadoc}/java/util/Calendar.html#clear%2Dint%2D[clear](int) (java 9)
-
[[painless-api-reference-Calendar-clone-0]]def link:{java8-javadoc}/java/util/Calendar.html#clone%2D%2D[clone]() (java 9)
-
[[painless-api-reference-Calendar-compareTo-1]]int link:{java8-javadoc}/java/util/Calendar.html#compareTo%2Djava.util.Calendar%2D[compareTo](<<painless-api-reference-Calendar,Calendar>>) (java 9)
-
[[painless-api-reference-Calendar-get-1]]int link:{java8-javadoc}/java/util/Calendar.html#get%2Dint%2D[get](int) (java 9)
-
[[painless-api-reference-Calendar-getActualMaximum-1]]int link:{java8-javadoc}/java/util/Calendar.html#getActualMaximum%2Dint%2D[getActualMaximum](int) (java 9)
-
[[painless-api-reference-Calendar-getActualMinimum-1]]int link:{java8-javadoc}/java/util/Calendar.html#getActualMinimum%2Dint%2D[getActualMinimum](int) (java 9)
-
[[painless-api-reference-Calendar-getCalendarType-0]]<<painless-api-reference-String,String>> link:{java8-javadoc}/java/util/Calendar.html#getCalendarType%2D%2D[getCalendarType]() (java 9)
-
[[painless-api-reference-Calendar-getDisplayName-3]]<<painless-api-reference-String,String>> link:{java8-javadoc}/java/util/Calendar.html#getDisplayName%2Dint%2Dint%2Djava.util.Locale%2D[getDisplayName](int, int, <<painless-api-reference-Locale,Locale>>) (java 9)
-
[[painless-api-reference-Calendar-getDisplayNames-3]]<<painless-api-reference-Map,Map>> link:{java8-javadoc}/java/util/Calendar.html#getDisplayNames%2Dint%2Dint%2Djava.util.Locale%2D[getDisplayNames](int, int, <<painless-api-reference-Locale,Locale>>) (java 9)
-
[[painless-api-reference-Calendar-getFirstDayOfWeek-0]]int link:{java8-javadoc}/java/util/Calendar.html#getFirstDayOfWeek%2D%2D[getFirstDayOfWeek]() (java 9)
-
[[painless-api-reference-Calendar-getGreatestMinimum-1]]int link:{java8-javadoc}/java/util/Calendar.html#getGreatestMinimum%2Dint%2D[getGreatestMinimum](int) (java 9)
-
[[painless-api-reference-Calendar-getLeastMaximum-1]]int link:{java8-javadoc}/java/util/Calendar.html#getLeastMaximum%2Dint%2D[getLeastMaximum](int) (java 9)
-
[[painless-api-reference-Calendar-getMaximum-1]]int link:{java8-javadoc}/java/util/Calendar.html#getMaximum%2Dint%2D[getMaximum](int) (java 9)
-
[[painless-api-reference-Calendar-getMinimalDaysInFirstWeek-0]]int link:{java8-javadoc}/java/util/Calendar.html#getMinimalDaysInFirstWeek%2D%2D[getMinimalDaysInFirstWeek]() (java 9)
-
[[painless-api-reference-Calendar-getMinimum-1]]int link:{java8-javadoc}/java/util/Calendar.html#getMinimum%2Dint%2D[getMinimum](int) (java 9)
-
[[painless-api-reference-Calendar-getTime-0]]<<painless-api-reference-Date,Date>> link:{java8-javadoc}/java/util/Calendar.html#getTime%2D%2D[getTime]() (java 9)
-
[[painless-api-reference-Calendar-getTimeInMillis-0]]long link:{java8-javadoc}/java/util/Calendar.html#getTimeInMillis%2D%2D[getTimeInMillis]() (java 9)
-
[[painless-api-reference-Calendar-getTimeZone-0]]<<painless-api-reference-TimeZone,TimeZone>> link:{java8-javadoc}/java/util/Calendar.html#getTimeZone%2D%2D[getTimeZone]() (java 9)
-
[[painless-api-reference-Calendar-getWeekYear-0]]int link:{java8-javadoc}/java/util/Calendar.html#getWeekYear%2D%2D[getWeekYear]() (java 9)
-
[[painless-api-reference-Calendar-getWeeksInWeekYear-0]]int link:{java8-javadoc}/java/util/Calendar.html#getWeeksInWeekYear%2D%2D[getWeeksInWeekYear]() (java 9)
-
[[painless-api-reference-Calendar-isLenient-0]]boolean link:{java8-javadoc}/java/util/Calendar.html#isLenient%2D%2D[isLenient]() (java 9)
-
[[painless-api-reference-Calendar-isSet-1]]boolean link:{java8-javadoc}/java/util/Calendar.html#isSet%2Dint%2D[isSet](int) (java 9)
-
[[painless-api-reference-Calendar-isWeekDateSupported-0]]boolean link:{java8-javadoc}/java/util/Calendar.html#isWeekDateSupported%2D%2D[isWeekDateSupported]() (java 9)
-
[[painless-api-reference-Calendar-roll-2]]void link:{java8-javadoc}/java/util/Calendar.html#roll%2Dint%2Dint%2D[roll](int, int) (java 9)
-
[[painless-api-reference-Calendar-set-2]]void link:{java8-javadoc}/java/util/Calendar.html#set%2Dint%2Dint%2D[set](int, int) (java 9)
-
[[painless-api-reference-Calendar-set-3]]void link:{java8-javadoc}/java/util/Calendar.html#set%2Dint%2Dint%2Dint%2D[set](int, int, int) (java 9)
-
[[painless-api-reference-Calendar-set-5]]void link:{java8-javadoc}/java/util/Calendar.html#set%2Dint%2Dint%2Dint%2Dint%2Dint%2D[set](int, int, int, int, int) (java 9)
-
[[painless-api-reference-Calendar-set-6]]void link:{java8-javadoc}/java/util/Calendar.html#set%2Dint%2Dint%2Dint%2Dint%2Dint%2Dint%2D[set](int, int, int, int, int, int) (java 9)
-
[[painless-api-reference-Calendar-setFirstDayOfWeek-1]]void link:{java8-javadoc}/java/util/Calendar.html#setFirstDayOfWeek%2Dint%2D[setFirstDayOfWeek](int) (java 9)
-
[[painless-api-reference-Calendar-setLenient-1]]void link:{java8-javadoc}/java/util/Calendar.html#setLenient%2Dboolean%2D[setLenient](boolean) (java 9)
-
[[painless-api-reference-Calendar-setMinimalDaysInFirstWeek-1]]void link:{java8-javadoc}/java/util/Calendar.html#setMinimalDaysInFirstWeek%2Dint%2D[setMinimalDaysInFirstWeek](int) (java 9)
-
[[painless-api-reference-Calendar-setTime-1]]void link:{java8-javadoc}/java/util/Calendar.html#setTime%2Djava.util.Date%2D[setTime](<<painless-api-reference-Date,Date>>) (java 9)
-
[[painless-api-reference-Calendar-setTimeInMillis-1]]void link:{java8-javadoc}/java/util/Calendar.html#setTimeInMillis%2Dlong%2D[setTimeInMillis](long) (java 9)
-
[[painless-api-reference-Calendar-setTimeZone-1]]void link:{java8-javadoc}/java/util/Calendar.html#setTimeZone%2Djava.util.TimeZone%2D[setTimeZone](<<painless-api-reference-TimeZone,TimeZone>>) (java 9)
-
[[painless-api-reference-Calendar-setWeekDate-3]]void link:{java8-javadoc}/java/util/Calendar.html#setWeekDate%2Dint%2Dint%2Dint%2D[setWeekDate](int, int, int) (java 9)
-
[[painless-api-reference-Calendar-toInstant-0]]<<painless-api-reference-Instant,Instant>> link:{java8-javadoc}/java/util/Calendar.html#toInstant%2D%2D[toInstant]() (java 9)
-
Inherits methods from <<painless-api-reference-Object,Object>>
-
-
- Calendar.Builder
-
-
[[painless-api-reference-Calendar-Builder-Calendar.Builder-0]]link:{java8-javadoc}/java/util/Calendar.Builder.html#Calendar.Builder%2D%2D[Calendar.Builder]() (java 9)
-
[[painless-api-reference-Calendar-Builder-build-0]]<<painless-api-reference-Calendar,Calendar>> link:{java8-javadoc}/java/util/Calendar.Builder.html#build%2D%2D[build]() (java 9)
-
[[painless-api-reference-Calendar-Builder-set-2]]<<painless-api-reference-Calendar-Builder,Calendar.Builder>> link:{java8-javadoc}/java/util/Calendar.Builder.html#set%2Dint%2Dint%2D[set](int, int) (java 9)
-
[[painless-api-reference-Calendar-Builder-setCalendarType-1]]<<painless-api-reference-Calendar-Builder,Calendar.Builder>> link:{java8-javadoc}/java/util/Calendar.Builder.html#setCalendarType%2Djava.lang.String%2D[setCalendarType](<<painless-api-reference-String,String>>) (java 9)
-
[[painless-api-reference-Calendar-Builder-setDate-3]]<<painless-api-reference-Calendar-Builder,Calendar.Builder>> link:{java8-javadoc}/java/util/Calendar.Builder.html#setDate%2Dint%2Dint%2Dint%2D[setDate](int, int, int) (java 9)
-
[[painless-api-reference-Calendar-Builder-setFields-1]]<<painless-api-reference-Calendar-Builder,Calendar.Builder>> link:{java8-javadoc}/java/util/Calendar.Builder.html#setFields%2Dint:A%2D[setFields](int[]) (java 9)
-
[[painless-api-reference-Calendar-Builder-setInstant-1]]<<painless-api-reference-Calendar-Builder,Calendar.Builder>> link:{java8-javadoc}/java/util/Calendar.Builder.html#setInstant%2Dlong%2D[setInstant](long) (java 9)
-
[[painless-api-reference-Calendar-Builder-setLenient-1]]<<painless-api-reference-Calendar-Builder,Calendar.Builder>> link:{java8-javadoc}/java/util/Calendar.Builder.html#setLenient%2Dboolean%2D[setLenient](boolean) (java 9)
-
[[painless-api-reference-Calendar-Builder-setLocale-1]]<<painless-api-reference-Calendar-Builder,Calendar.Builder>> link:{java8-javadoc}/java/util/Calendar.Builder.html#setLocale%2Djava.util.Locale%2D[setLocale](<<painless-api-reference-Locale,Locale>>) (java 9)
-
[[painless-api-reference-Calendar-Builder-setTimeOfDay-3]]<<painless-api-reference-Calendar-Builder,Calendar.Builder>> link:{java8-javadoc}/java/util/Calendar.Builder.html#setTimeOfDay%2Dint%2Dint%2Dint%2D[setTimeOfDay](int, int, int) (java 9)
-
[[painless-api-reference-Calendar-Builder-setTimeOfDay-4]]<<painless-api-reference-Calendar-Builder,Calendar.Builder>> link:{java8-javadoc}/java/util/Calendar.Builder.html#setTimeOfDay%2Dint%2Dint%2Dint%2Dint%2D[setTimeOfDay](int, int, int, int) (java 9)
-
[[painless-api-reference-Calendar-Builder-setTimeZone-1]]<<painless-api-reference-Calendar-Builder,Calendar.Builder>> link:{java8-javadoc}/java/util/Calendar.Builder.html#setTimeZone%2Djava.util.TimeZone%2D[setTimeZone](<<painless-api-reference-TimeZone,TimeZone>>) (java 9)
-
[[painless-api-reference-Calendar-Builder-setWeekDate-3]]<<painless-api-reference-Calendar-Builder,Calendar.Builder>> link:{java8-javadoc}/java/util/Calendar.Builder.html#setWeekDate%2Dint%2Dint%2Dint%2D[setWeekDate](int, int, int) (java 9)
-
[[painless-api-reference-Calendar-Builder-setWeekDefinition-2]]<<painless-api-reference-Calendar-Builder,Calendar.Builder>> link:{java8-javadoc}/java/util/Calendar.Builder.html#setWeekDefinition%2Dint%2Dint%2D[setWeekDefinition](int, int) (java 9)
-
Inherits methods from <<painless-api-reference-Object,Object>>
-
- CharSequence
-
-
[[painless-api-reference-CharSequence-charAt-1]]char link:{java8-javadoc}/java/lang/CharSequence.html#charAt%2Dint%2D[charAt](int) (java 9)
-
[[painless-api-reference-CharSequence-chars-0]]<<painless-api-reference-IntStream,IntStream>> link:{java8-javadoc}/java/lang/CharSequence.html#chars%2D%2D[chars]() (java 9)
-
[[painless-api-reference-CharSequence-codePoints-0]]<<painless-api-reference-IntStream,IntStream>> link:{java8-javadoc}/java/lang/CharSequence.html#codePoints%2D%2D[codePoints]() (java 9)
-
[[painless-api-reference-CharSequence-length-0]]int link:{java8-javadoc}/java/lang/CharSequence.html#length%2D%2D[length]() (java 9)
-
[[painless-api-reference-CharSequence-replaceAll-2]]<<painless-api-reference-String,String>> link:{painless-javadoc}/org/elasticsearch/painless/api/Augmentation.html#replaceAll%2Djava.lang.CharSequence%2Djava.util.regex.Pattern%2Djava.util.function.Function%2D[replaceAll](<<painless-api-reference-Pattern,Pattern>>, <<painless-api-reference-Function,Function>>)
-
[[painless-api-reference-CharSequence-replaceFirst-2]]<<painless-api-reference-String,String>> link:{painless-javadoc}/org/elasticsearch/painless/api/Augmentation.html#replaceFirst%2Djava.lang.CharSequence%2Djava.util.regex.Pattern%2Djava.util.function.Function%2D[replaceFirst](<<painless-api-reference-Pattern,Pattern>>, <<painless-api-reference-Function,Function>>)
-
[[painless-api-reference-CharSequence-subSequence-2]]<<painless-api-reference-CharSequence,CharSequence>> link:{java8-javadoc}/java/lang/CharSequence.html#subSequence%2Dint%2Dint%2D[subSequence](int, int) (java 9)
-
[[painless-api-reference-CharSequence-toString-0]]<<painless-api-reference-String,String>> link:{java8-javadoc}/java/lang/CharSequence.html#toString%2D%2D[toString]() (java 9)
-
Inherits methods from <<painless-api-reference-Object,Object>>
-
- Character
-
-
static byte COMBINING_SPACING_MARK (java 9)
-
static byte CONNECTOR_PUNCTUATION (java 9)
-
static byte CURRENCY_SYMBOL (java 9)
-
static byte DASH_PUNCTUATION (java 9)
-
static byte DECIMAL_DIGIT_NUMBER (java 9)
-
static byte DIRECTIONALITY_ARABIC_NUMBER (java 9)
-
static byte DIRECTIONALITY_BOUNDARY_NEUTRAL (java 9)
-
static byte DIRECTIONALITY_COMMON_NUMBER_SEPARATOR (java 9)
-
static byte DIRECTIONALITY_EUROPEAN_NUMBER (java 9)
-
static byte DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR (java 9)
-
static byte DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR (java 9)
-
static byte DIRECTIONALITY_LEFT_TO_RIGHT (java 9)
-
static byte DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING (java 9)
-
static byte DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE (java 9)
-
static byte DIRECTIONALITY_NONSPACING_MARK (java 9)
-
static byte DIRECTIONALITY_OTHER_NEUTRALS (java 9)
-
static byte DIRECTIONALITY_PARAGRAPH_SEPARATOR (java 9)
-
static byte DIRECTIONALITY_POP_DIRECTIONAL_FORMAT (java 9)
-
static byte DIRECTIONALITY_RIGHT_TO_LEFT (java 9)
-
static byte DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC (java 9)
-
static byte DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING (java 9)
-
static byte DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE (java 9)
-
static byte DIRECTIONALITY_SEGMENT_SEPARATOR (java 9)
-
static byte DIRECTIONALITY_UNDEFINED (java 9)
-
static byte DIRECTIONALITY_WHITESPACE (java 9)
-
static byte ENCLOSING_MARK (java 9)
-
static byte END_PUNCTUATION (java 9)
-
static byte FINAL_QUOTE_PUNCTUATION (java 9)
-
static byte INITIAL_QUOTE_PUNCTUATION (java 9)
-
static byte LETTER_NUMBER (java 9)
-
static byte LINE_SEPARATOR (java 9)
-
static byte LOWERCASE_LETTER (java 9)
-
static byte MATH_SYMBOL (java 9)
-
static int MAX_CODE_POINT (java 9)
-
static char MAX_HIGH_SURROGATE (java 9)
-
static char MAX_LOW_SURROGATE (java 9)
-
static char MAX_SURROGATE (java 9)
-
static char MIN_CODE_POINT (java 9)
-
static char MIN_HIGH_SURROGATE (java 9)
-
static char MIN_LOW_SURROGATE (java 9)
-
static int MIN_SUPPLEMENTARY_CODE_POINT (java 9)
-
static char MIN_SURROGATE (java 9)
-
static byte MODIFIER_LETTER (java 9)
-
static byte MODIFIER_SYMBOL (java 9)
-
static byte NON_SPACING_MARK (java 9)
-
static byte OTHER_LETTER (java 9)
-
static byte OTHER_NUMBER (java 9)
-
static byte OTHER_PUNCTUATION (java 9)
-
static byte OTHER_SYMBOL (java 9)
-
static byte PARAGRAPH_SEPARATOR (java 9)
-
static byte PRIVATE_USE (java 9)
-
static byte SPACE_SEPARATOR (java 9)
-
static byte START_PUNCTUATION (java 9)
-
static byte TITLECASE_LETTER (java 9)
-
static byte UNASSIGNED (java 9)
-
static byte UPPERCASE_LETTER (java 9)
-
[[painless-api-reference-Character-charCount-1]]static int link:{java8-javadoc}/java/lang/Character.html#charCount%2Dint%2D[charCount](int) (java 9)
-
[[painless-api-reference-Character-codePointAt-2]]static int link:{java8-javadoc}/java/lang/Character.html#codePointAt%2Djava.lang.CharSequence%2Dint%2D[codePointAt](<<painless-api-reference-CharSequence,CharSequence>>, int) (java 9)
-
[[painless-api-reference-Character-codePointAt-3]]static int link:{java8-javadoc}/java/lang/Character.html#codePointAt%2Dchar:A%2Dint%2Dint%2D[codePointAt](char[], int, int) (java 9)
-
[[painless-api-reference-Character-codePointBefore-2]]static int link:{java8-javadoc}/java/lang/Character.html#codePointBefore%2Djava.lang.CharSequence%2Dint%2D[codePointBefore](<<painless-api-reference-CharSequence,CharSequence>>, int) (java 9)
-
[[painless-api-reference-Character-codePointBefore-3]]static int link:{java8-javadoc}/java/lang/Character.html#codePointBefore%2Dchar:A%2Dint%2Dint%2D[codePointBefore](char[], int, int) (java 9)
-
[[painless-api-reference-Character-codePointCount-3]]static int link:{java8-javadoc}/java/lang/Character.html#codePointCount%2Djava.lang.CharSequence%2Dint%2Dint%2D[codePointCount](<<painless-api-reference-CharSequence,CharSequence>>, int, int) (java 9)
-
[[painless-api-reference-Character-compare-2]]static int link:{java8-javadoc}/java/lang/Character.html#compare%2Dchar%2Dchar%2D[compare](char, char) (java 9)
-
[[painless-api-reference-Character-digit-2]]static int link:{java8-javadoc}/java/lang/Character.html#digit%2Dint%2Dint%2D[digit](int, int) (java 9)
-
[[painless-api-reference-Character-forDigit-2]]static char link:{java8-javadoc}/java/lang/Character.html#forDigit%2Dint%2Dint%2D[forDigit](int, int) (java 9)
-
[[painless-api-reference-Character-getDirectionality-1]]static byte link:{java8-javadoc}/java/lang/Character.html#getDirectionality%2Dint%2D[getDirectionality](int) (java 9)
-
[[painless-api-reference-Character-getName-1]]static <<painless-api-reference-String,String>> link:{java8-javadoc}/java/lang/Character.html#getName%2Dint%2D[getName](int) (java 9)
-
[[painless-api-reference-Character-getNumericValue-1]]static int link:{java8-javadoc}/java/lang/Character.html#getNumericValue%2Dint%2D[getNumericValue](int) (java 9)
-
[[painless-api-reference-Character-getType-1]]static int link:{java8-javadoc}/java/lang/Character.html#getType%2Dint%2D[getType](int) (java 9)
-
[[painless-api-reference-Character-hashCode-1]]static int link:{java8-javadoc}/java/lang/Character.html#hashCode%2Dchar%2D[hashCode](char) (java 9)
-
[[painless-api-reference-Character-highSurrogate-1]]static char link:{java8-javadoc}/java/lang/Character.html#highSurrogate%2Dint%2D[highSurrogate](int) (java 9)
-
[[painless-api-reference-Character-isAlphabetic-1]]static boolean link:{java8-javadoc}/java/lang/Character.html#isAlphabetic%2Dint%2D[isAlphabetic](int) (java 9)
-
[[painless-api-reference-Character-isBmpCodePoint-1]]static boolean link:{java8-javadoc}/java/lang/Character.html#isBmpCodePoint%2Dint%2D[isBmpCodePoint](int) (java 9)
-
[[painless-api-reference-Character-isDefined-1]]static boolean link:{java8-javadoc}/java/lang/Character.html#isDefined%2Dint%2D[isDefined](int) (java 9)
-
[[painless-api-reference-Character-isDigit-1]]static boolean link:{java8-javadoc}/java/lang/Character.html#isDigit%2Dint%2D[isDigit](int) (java 9)
-
[[painless-api-reference-Character-isHighSurrogate-1]]static boolean link:{java8-javadoc}/java/lang/Character.html#isHighSurrogate%2Dchar%2D[isHighSurrogate](char) (java 9)
-
[[painless-api-reference-Character-isISOControl-1]]static boolean link:{java8-javadoc}/java/lang/Character.html#isISOControl%2Dint%2D[isISOControl](int) (java 9)
-
[[painless-api-reference-Character-isIdentifierIgnorable-1]]static boolean link:{java8-javadoc}/java/lang/Character.html#isIdentifierIgnorable%2Dint%2D[isIdentifierIgnorable](int) (java 9)
-
[[painless-api-reference-Character-isIdeographic-1]]static boolean link:{java8-javadoc}/java/lang/Character.html#isIdeographic%2Dint%2D[isIdeographic](int) (java 9)
-
[[painless-api-reference-Character-isJavaIdentifierPart-1]]static boolean link:{java8-javadoc}/java/lang/Character.html#isJavaIdentifierPart%2Dint%2D[isJavaIdentifierPart](int) (java 9)
-
[[painless-api-reference-Character-isJavaIdentifierStart-1]]static boolean link:{java8-javadoc}/java/lang/Character.html#isJavaIdentifierStart%2Dint%2D[isJavaIdentifierStart](int) (java 9)
-
[[painless-api-reference-Character-isLetter-1]]static boolean link:{java8-javadoc}/java/lang/Character.html#isLetter%2Dint%2D[isLetter](int) (java 9)
-
[[painless-api-reference-Character-isLetterOrDigit-1]]static boolean link:{java8-javadoc}/java/lang/Character.html#isLetterOrDigit%2Dint%2D[isLetterOrDigit](int) (java 9)
-
[[painless-api-reference-Character-isLowerCase-1]]static boolean link:{java8-javadoc}/java/lang/Character.html#isLowerCase%2Dint%2D[isLowerCase](int) (java 9)
-
[[painless-api-reference-Character-isMirrored-1]]static boolean link:{java8-javadoc}/java/lang/Character.html#isMirrored%2Dint%2D[isMirrored](int) (java 9)
-
[[painless-api-reference-Character-isSpaceChar-1]]static boolean link:{java8-javadoc}/java/lang/Character.html#isSpaceChar%2Dint%2D[isSpaceChar](int) (java 9)
-
[[painless-api-reference-Character-isSupplementaryCodePoint-1]]static boolean link:{java8-javadoc}/java/lang/Character.html#isSupplementaryCodePoint%2Dint%2D[isSupplementaryCodePoint](int) (java 9)
-
[[painless-api-reference-Character-isSurrogate-1]]static boolean link:{java8-javadoc}/java/lang/Character.html#isSurrogate%2Dchar%2D[isSurrogate](char) (java 9)
-
[[painless-api-reference-Character-isSurrogatePair-2]]static boolean link:{java8-javadoc}/java/lang/Character.html#isSurrogatePair%2Dchar%2Dchar%2D[isSurrogatePair](char, char) (java 9)
-
[[painless-api-reference-Character-isTitleCase-1]]static boolean link:{java8-javadoc}/java/lang/Character.html#isTitleCase%2Dint%2D[isTitleCase](int) (java 9)
-
[[painless-api-reference-Character-isUnicodeIdentifierPart-1]]static boolean link:{java8-javadoc}/java/lang/Character.html#isUnicodeIdentifierPart%2Dint%2D[isUnicodeIdentifierPart](int) (java 9)
-
[[painless-api-reference-Character-isUnicodeIdentifierStart-1]]static boolean link:{java8-javadoc}/java/lang/Character.html#isUnicodeIdentifierStart%2Dint%2D[isUnicodeIdentifierStart](int) (java 9)
-
[[painless-api-reference-Character-isUpperCase-1]]static boolean link:{java8-javadoc}/java/lang/Character.html#isUpperCase%2Dint%2D[isUpperCase](int) (java 9)
-
[[painless-api-reference-Character-isValidCodePoint-1]]static boolean link:{java8-javadoc}/java/lang/Character.html#isValidCodePoint%2Dint%2D[isValidCodePoint](int) (java 9)
-
[[painless-api-reference-Character-isWhitespace-1]]static boolean link:{java8-javadoc}/java/lang/Character.html#isWhitespace%2Dint%2D[isWhitespace](int) (java 9)
-
[[painless-api-reference-Character-lowSurrogate-1]]static char link:{java8-javadoc}/java/lang/Character.html#lowSurrogate%2Dint%2D[lowSurrogate](int) (java 9)
-
[[painless-api-reference-Character-offsetByCodePoints-3]]static int link:{java8-javadoc}/java/lang/Character.html#offsetByCodePoints%2Djava.lang.CharSequence%2Dint%2Dint%2D[offsetByCodePoints](<<painless-api-reference-CharSequence,CharSequence>>, int, int) (java 9)
-
[[painless-api-reference-Character-offsetByCodePoints-5]]static int link:{java8-javadoc}/java/lang/Character.html#offsetByCodePoints%2Dchar:A%2Dint%2Dint%2Dint%2Dint%2D[offsetByCodePoints](char[], int, int, int, int) (java 9)
-
[[painless-api-reference-Character-reverseBytes-1]]static char link:{java8-javadoc}/java/lang/Character.html#reverseBytes%2Dchar%2D[reverseBytes](char) (java 9)
-
[[painless-api-reference-Character-toChars-1]]static char[] link:{java8-javadoc}/java/lang/Character.html#toChars%2Dint%2D[toChars](int) (java 9)
-
[[painless-api-reference-Character-toChars-3]]static int link:{java8-javadoc}/java/lang/Character.html#toChars%2Dint%2Dchar:A%2Dint%2D[toChars](int, char[], int) (java 9)
-
[[painless-api-reference-Character-toCodePoint-2]]static int link:{java8-javadoc}/java/lang/Character.html#toCodePoint%2Dchar%2Dchar%2D[toCodePoint](char, char) (java 9)
-
[[painless-api-reference-Character-toLowerCase-1]]static char link:{java8-javadoc}/java/lang/Character.html#toLowerCase%2Dchar%2D[toLowerCase](char) (java 9)
-
[[painless-api-reference-Character-toString-1]]static <<painless-api-reference-String,String>> link:{java8-javadoc}/java/lang/Character.html#toString%2Dchar%2D[toString](char) (java 9)
-
[[painless-api-reference-Character-toTitleCase-1]]static char link:{java8-javadoc}/java/lang/Character.html#toTitleCase%2Dchar%2D[toTitleCase](char) (java 9)
-
[[painless-api-reference-Character-toUpperCase-1]]static char link:{java8-javadoc}/java/lang/Character.html#toUpperCase%2Dchar%2D[toUpperCase](char) (java 9)
-
[[painless-api-reference-Character-valueOf-1]]static <<painless-api-reference-Character,Character>> link:{java8-javadoc}/java/lang/Character.html#valueOf%2Dchar%2D[valueOf](char) (java 9)
-
[[painless-api-reference-Character-charValue-0]]char link:{java8-javadoc}/java/lang/Character.html#charValue%2D%2D[charValue]() (java 9)
-
[[painless-api-reference-Character-compareTo-1]]int link:{java8-javadoc}/java/lang/Character.html#compareTo%2Djava.lang.Character%2D[compareTo](<<painless-api-reference-Character,Character>>) (java 9)
-
Inherits methods from <<painless-api-reference-Object,Object>>
-
- Character.UnicodeBlock
-
-
static Character.UnicodeBlock AEGEAN_NUMBERS (java 9)
-
static Character.UnicodeBlock ALPHABETIC_PRESENTATION_FORMS (java 9)
-
static Character.UnicodeBlock ANCIENT_GREEK_MUSICAL_NOTATION (java 9)
-
static Character.UnicodeBlock ANCIENT_GREEK_NUMBERS (java 9)
-
static Character.UnicodeBlock ANCIENT_SYMBOLS (java 9)
-
static Character.UnicodeBlock ARABIC (java 9)
-
static Character.UnicodeBlock ARABIC_MATHEMATICAL_ALPHABETIC_SYMBOLS (java 9)
-
static Character.UnicodeBlock ARABIC_PRESENTATION_FORMS_A (java 9)
-
static Character.UnicodeBlock ARABIC_PRESENTATION_FORMS_B (java 9)
-
static Character.UnicodeBlock ARMENIAN (java 9)
-
static Character.UnicodeBlock ARROWS (java 9)
-
static Character.UnicodeBlock AVESTAN (java 9)
-
static Character.UnicodeBlock BALINESE (java 9)
-
static Character.UnicodeBlock BAMUM (java 9)
-
static Character.UnicodeBlock BAMUM_SUPPLEMENT (java 9)
-
static Character.UnicodeBlock BASIC_LATIN (java 9)
-
static Character.UnicodeBlock BATAK (java 9)
-
static Character.UnicodeBlock BENGALI (java 9)
-
static Character.UnicodeBlock BLOCK_ELEMENTS (java 9)
-
static Character.UnicodeBlock BOPOMOFO (java 9)
-
static Character.UnicodeBlock BOX_DRAWING (java 9)
-
static Character.UnicodeBlock BRAHMI (java 9)
-
static Character.UnicodeBlock BRAILLE_PATTERNS (java 9)
-
static Character.UnicodeBlock BUGINESE (java 9)
-
static Character.UnicodeBlock BUHID (java 9)
-
static Character.UnicodeBlock BYZANTINE_MUSICAL_SYMBOLS (java 9)
-
static Character.UnicodeBlock CARIAN (java 9)
-
static Character.UnicodeBlock CHAKMA (java 9)
-
static Character.UnicodeBlock CHAM (java 9)
-
static Character.UnicodeBlock CHEROKEE (java 9)
-
static Character.UnicodeBlock CJK_COMPATIBILITY_FORMS (java 9)
-
static Character.UnicodeBlock CJK_COMPATIBILITY_IDEOGRAPHS (java 9)
-
static Character.UnicodeBlock CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT (java 9)
-
static Character.UnicodeBlock CJK_RADICALS_SUPPLEMENT (java 9)
-
static Character.UnicodeBlock CJK_STROKES (java 9)
-
static Character.UnicodeBlock CJK_SYMBOLS_AND_PUNCTUATION (java 9)
-
static Character.UnicodeBlock CJK_UNIFIED_IDEOGRAPHS (java 9)
-
static Character.UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A (java 9)
-
static Character.UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B (java 9)
-
static Character.UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C (java 9)
-
static Character.UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D (java 9)
-
static Character.UnicodeBlock COMBINING_DIACRITICAL_MARKS (java 9)
-
static Character.UnicodeBlock COMBINING_DIACRITICAL_MARKS_SUPPLEMENT (java 9)
-
static Character.UnicodeBlock COMBINING_MARKS_FOR_SYMBOLS (java 9)
-
static Character.UnicodeBlock COMMON_INDIC_NUMBER_FORMS (java 9)
-
static Character.UnicodeBlock CONTROL_PICTURES (java 9)
-
static Character.UnicodeBlock COPTIC (java 9)
-
static Character.UnicodeBlock COUNTING_ROD_NUMERALS (java 9)
-
static Character.UnicodeBlock CUNEIFORM (java 9)
-
static Character.UnicodeBlock CUNEIFORM_NUMBERS_AND_PUNCTUATION (java 9)
-
static Character.UnicodeBlock CURRENCY_SYMBOLS (java 9)
-
static Character.UnicodeBlock CYRILLIC (java 9)
-
static Character.UnicodeBlock CYRILLIC_SUPPLEMENTARY (java 9)
-
static Character.UnicodeBlock DESERET (java 9)
-
static Character.UnicodeBlock DEVANAGARI (java 9)
-
static Character.UnicodeBlock DINGBATS (java 9)
-
static Character.UnicodeBlock DOMINO_TILES (java 9)
-
static Character.UnicodeBlock EMOTICONS (java 9)
-
static Character.UnicodeBlock ENCLOSED_ALPHANUMERICS (java 9)
-
static Character.UnicodeBlock ENCLOSED_ALPHANUMERIC_SUPPLEMENT (java 9)
-
static Character.UnicodeBlock ENCLOSED_CJK_LETTERS_AND_MONTHS (java 9)
-
static Character.UnicodeBlock ENCLOSED_IDEOGRAPHIC_SUPPLEMENT (java 9)
-
static Character.UnicodeBlock ETHIOPIC (java 9)
-
static Character.UnicodeBlock GEOMETRIC_SHAPES (java 9)
-
static Character.UnicodeBlock GEORGIAN (java 9)
-
static Character.UnicodeBlock GLAGOLITIC (java 9)
-
static Character.UnicodeBlock GOTHIC (java 9)
-
static Character.UnicodeBlock GREEK (java 9)
-
static Character.UnicodeBlock GREEK_EXTENDED (java 9)
-
static Character.UnicodeBlock GUJARATI (java 9)
-
static Character.UnicodeBlock GURMUKHI (java 9)
-
static Character.UnicodeBlock HALFWIDTH_AND_FULLWIDTH_FORMS (java 9)
-
static Character.UnicodeBlock HANGUL_COMPATIBILITY_JAMO (java 9)
-
static Character.UnicodeBlock HANGUL_JAMO (java 9)
-
static Character.UnicodeBlock HANGUL_JAMO_EXTENDED_A (java 9)
-
static Character.UnicodeBlock HANGUL_JAMO_EXTENDED_B (java 9)
-
static Character.UnicodeBlock HANGUL_SYLLABLES (java 9)
-
static Character.UnicodeBlock HANUNOO (java 9)
-
static Character.UnicodeBlock HEBREW (java 9)
-
static Character.UnicodeBlock HIGH_PRIVATE_USE_SURROGATES (java 9)
-
static Character.UnicodeBlock HIGH_SURROGATES (java 9)
-
static Character.UnicodeBlock HIRAGANA (java 9)
-
static Character.UnicodeBlock IDEOGRAPHIC_DESCRIPTION_CHARACTERS (java 9)
-
static Character.UnicodeBlock IMPERIAL_ARAMAIC (java 9)
-
static Character.UnicodeBlock INSCRIPTIONAL_PAHLAVI (java 9)
-
static Character.UnicodeBlock INSCRIPTIONAL_PARTHIAN (java 9)
-
static Character.UnicodeBlock IPA_EXTENSIONS (java 9)
-
static Character.UnicodeBlock JAVANESE (java 9)
-
static Character.UnicodeBlock KAITHI (java 9)
-
static Character.UnicodeBlock KANA_SUPPLEMENT (java 9)
-
static Character.UnicodeBlock KANBUN (java 9)
-
static Character.UnicodeBlock KANGXI_RADICALS (java 9)
-
static Character.UnicodeBlock KANNADA (java 9)
-
static Character.UnicodeBlock KATAKANA (java 9)
-
static Character.UnicodeBlock KATAKANA_PHONETIC_EXTENSIONS (java 9)
-
static Character.UnicodeBlock KAYAH_LI (java 9)
-
static Character.UnicodeBlock KHAROSHTHI (java 9)
-
static Character.UnicodeBlock KHMER (java 9)
-
static Character.UnicodeBlock KHMER_SYMBOLS (java 9)
-
static Character.UnicodeBlock LAO (java 9)
-
static Character.UnicodeBlock LATIN_EXTENDED_A (java 9)
-
static Character.UnicodeBlock LATIN_EXTENDED_ADDITIONAL (java 9)
-
static Character.UnicodeBlock LATIN_EXTENDED_B (java 9)
-
static Character.UnicodeBlock LATIN_EXTENDED_C (java 9)
-
static Character.UnicodeBlock LATIN_EXTENDED_D (java 9)
-
static Character.UnicodeBlock LEPCHA (java 9)
-
static Character.UnicodeBlock LIMBU (java 9)
-
static Character.UnicodeBlock LISU (java 9)
-
static Character.UnicodeBlock LOW_SURROGATES (java 9)
-
static Character.UnicodeBlock LYCIAN (java 9)
-
static Character.UnicodeBlock LYDIAN (java 9)
-
static Character.UnicodeBlock MAHJONG_TILES (java 9)
-
static Character.UnicodeBlock MALAYALAM (java 9)
-
static Character.UnicodeBlock MANDAIC (java 9)
-
static Character.UnicodeBlock MATHEMATICAL_ALPHANUMERIC_SYMBOLS (java 9)
-
static Character.UnicodeBlock MATHEMATICAL_OPERATORS (java 9)
-
static Character.UnicodeBlock MEETEI_MAYEK (java 9)
-
static Character.UnicodeBlock MEETEI_MAYEK_EXTENSIONS (java 9)
-
static Character.UnicodeBlock MEROITIC_CURSIVE (java 9)
-
static Character.UnicodeBlock MIAO (java 9)
-
static Character.UnicodeBlock MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A (java 9)
-
static Character.UnicodeBlock MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B (java 9)
-
static Character.UnicodeBlock MISCELLANEOUS_SYMBOLS (java 9)
-
static Character.UnicodeBlock MISCELLANEOUS_SYMBOLS_AND_ARROWS (java 9)
-
static Character.UnicodeBlock MISCELLANEOUS_SYMBOLS_AND_PICTOGRAPHS (java 9)
-
static Character.UnicodeBlock MISCELLANEOUS_TECHNICAL (java 9)
-
static Character.UnicodeBlock MODIFIER_TONE_LETTERS (java 9)
-
static Character.UnicodeBlock MONGOLIAN (java 9)
-
static Character.UnicodeBlock MUSICAL_SYMBOLS (java 9)
-
static Character.UnicodeBlock MYANMAR (java 9)
-
static Character.UnicodeBlock NEW_TAI_LUE (java 9)
-
static Character.UnicodeBlock NKO (java 9)
-
static Character.UnicodeBlock NUMBER_FORMS (java 9)
-
static Character.UnicodeBlock OGHAM (java 9)
-
static Character.UnicodeBlock OLD_ITALIC (java 9)
-
static Character.UnicodeBlock OLD_PERSIAN (java 9)
-
static Character.UnicodeBlock OLD_TURKIC (java 9)
-
static Character.UnicodeBlock OL_CHIKI (java 9)
-
static Character.UnicodeBlock OPTICAL_CHARACTER_RECOGNITION (java 9)
-
static Character.UnicodeBlock ORIYA (java 9)
-
static Character.UnicodeBlock OSMANYA (java 9)
-
static Character.UnicodeBlock PHAGS_PA (java 9)
-
static Character.UnicodeBlock PHAISTOS_DISC (java 9)
-
static Character.UnicodeBlock PHOENICIAN (java 9)
-
static Character.UnicodeBlock PHONETIC_EXTENSIONS_SUPPLEMENT (java 9)
-
static Character.UnicodeBlock PLAYING_CARDS (java 9)
-
static Character.UnicodeBlock PRIVATE_USE_AREA (java 9)
-
static Character.UnicodeBlock REJANG (java 9)
-
static Character.UnicodeBlock RUNIC (java 9)
-
static Character.UnicodeBlock SAMARITAN (java 9)
-
static Character.UnicodeBlock SAURASHTRA (java 9)
-
static Character.UnicodeBlock SHARADA (java 9)
-
static Character.UnicodeBlock SHAVIAN (java 9)
-
static Character.UnicodeBlock SINHALA (java 9)
-
static Character.UnicodeBlock SORA_SOMPENG (java 9)
-
static Character.UnicodeBlock SPACING_MODIFIER_LETTERS (java 9)
-
static Character.UnicodeBlock SPECIALS (java 9)
-
static Character.UnicodeBlock SUNDANESE (java 9)
-
static Character.UnicodeBlock SUPERSCRIPTS_AND_SUBSCRIPTS (java 9)
-
static Character.UnicodeBlock SUPPLEMENTAL_ARROWS_A (java 9)
-
static Character.UnicodeBlock SUPPLEMENTAL_ARROWS_B (java 9)
-
static Character.UnicodeBlock SUPPLEMENTAL_MATHEMATICAL_OPERATORS (java 9)
-
static Character.UnicodeBlock SUPPLEMENTAL_PUNCTUATION (java 9)
-
static Character.UnicodeBlock SUPPLEMENTARY_PRIVATE_USE_AREA_A (java 9)
-
static Character.UnicodeBlock SUPPLEMENTARY_PRIVATE_USE_AREA_B (java 9)
-
static Character.UnicodeBlock SYLOTI_NAGRI (java 9)
-
static Character.UnicodeBlock SYRIAC (java 9)
-
static Character.UnicodeBlock TAGALOG (java 9)
-
static Character.UnicodeBlock TAGBANWA (java 9)
-
static Character.UnicodeBlock TAGS (java 9)
-
static Character.UnicodeBlock TAI_LE (java 9)
-
static Character.UnicodeBlock TAI_THAM (java 9)
-
static Character.UnicodeBlock TAI_VIET (java 9)
-
static Character.UnicodeBlock TAI_XUAN_JING_SYMBOLS (java 9)
-
static Character.UnicodeBlock TAKRI (java 9)
-
static Character.UnicodeBlock TAMIL (java 9)
-
static Character.UnicodeBlock TELUGU (java 9)
-
static Character.UnicodeBlock THAANA (java 9)
-
static Character.UnicodeBlock THAI (java 9)
-
static Character.UnicodeBlock TIBETAN (java 9)
-
static Character.UnicodeBlock TIFINAGH (java 9)
-
static Character.UnicodeBlock TRANSPORT_AND_MAP_SYMBOLS (java 9)
-
static Character.UnicodeBlock UGARITIC (java 9)
-
static Character.UnicodeBlock UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS (java 9)
-
static Character.UnicodeBlock UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED (java 9)
-
static Character.UnicodeBlock VAI (java 9)
-
static Character.UnicodeBlock VARIATION_SELECTORS_SUPPLEMENT (java 9)
-
static Character.UnicodeBlock VEDIC_EXTENSIONS (java 9)
-
static Character.UnicodeBlock VERTICAL_FORMS (java 9)
-
static Character.UnicodeBlock YIJING_HEXAGRAM_SYMBOLS (java 9)
-
static Character.UnicodeBlock YI_RADICALS (java 9)
-
static Character.UnicodeBlock YI_SYLLABLES (java 9)
-
[[painless-api-reference-Character-UnicodeBlock-forName-1]]static <<painless-api-reference-Character-UnicodeBlock,Character.UnicodeBlock>> link:{java8-javadoc}/java/lang/Character.UnicodeBlock.html#forName%2Djava.lang.String%2D[forName](<<painless-api-reference-String,String>>) (java 9)
-
[[painless-api-reference-Character-UnicodeBlock-of-1]]static <<painless-api-reference-Character-UnicodeBlock,Character.UnicodeBlock>> link:{java8-javadoc}/java/lang/Character.UnicodeBlock.html#of%2Dint%2D[of](int) (java 9)
-
Inherits methods from <<painless-api-reference-Object,Object>>
-
-
- Character.UnicodeScript
-
-
static Character.UnicodeScript ARABIC (java 9)
-
static Character.UnicodeScript ARMENIAN (java 9)
-
static Character.UnicodeScript AVESTAN (java 9)
-
static Character.UnicodeScript BALINESE (java 9)
-
static Character.UnicodeScript BAMUM (java 9)
-
static Character.UnicodeScript BATAK (java 9)
-
static Character.UnicodeScript BENGALI (java 9)
-
static Character.UnicodeScript BOPOMOFO (java 9)
-
static Character.UnicodeScript BRAHMI (java 9)
-
static Character.UnicodeScript BRAILLE (java 9)
-
static Character.UnicodeScript BUGINESE (java 9)
-
static Character.UnicodeScript BUHID (java 9)
-
static Character.UnicodeScript CARIAN (java 9)
-
static Character.UnicodeScript CHAKMA (java 9)
-
static Character.UnicodeScript CHAM (java 9)
-
static Character.UnicodeScript CHEROKEE (java 9)
-
static Character.UnicodeScript COMMON (java 9)
-
static Character.UnicodeScript COPTIC (java 9)
-
static Character.UnicodeScript CUNEIFORM (java 9)
-
static Character.UnicodeScript CYPRIOT (java 9)
-
static Character.UnicodeScript CYRILLIC (java 9)
-
static Character.UnicodeScript DESERET (java 9)
-
static Character.UnicodeScript DEVANAGARI (java 9)
-
static Character.UnicodeScript EGYPTIAN_HIEROGLYPHS (java 9)
-
static Character.UnicodeScript ETHIOPIC (java 9)
-
static Character.UnicodeScript GEORGIAN (java 9)
-
static Character.UnicodeScript GLAGOLITIC (java 9)
-
static Character.UnicodeScript GOTHIC (java 9)
-
static Character.UnicodeScript GREEK (java 9)
-
static Character.UnicodeScript GUJARATI (java 9)
-
static Character.UnicodeScript GURMUKHI (java 9)
-
static Character.UnicodeScript HAN (java 9)
-
static Character.UnicodeScript HANGUL (java 9)
-
static Character.UnicodeScript HANUNOO (java 9)
-
static Character.UnicodeScript HEBREW (java 9)
-
static Character.UnicodeScript HIRAGANA (java 9)
-
static Character.UnicodeScript INHERITED (java 9)
-
static Character.UnicodeScript INSCRIPTIONAL_PAHLAVI (java 9)
-
static Character.UnicodeScript INSCRIPTIONAL_PARTHIAN (java 9)
-
static Character.UnicodeScript JAVANESE (java 9)
-
static Character.UnicodeScript KAITHI (java 9)
-
static Character.UnicodeScript KANNADA (java 9)
-
static Character.UnicodeScript KATAKANA (java 9)
-
static Character.UnicodeScript KAYAH_LI (java 9)
-
static Character.UnicodeScript KHAROSHTHI (java 9)
-
static Character.UnicodeScript KHMER (java 9)
-
static Character.UnicodeScript LAO (java 9)
-
static Character.UnicodeScript LATIN (java 9)
-
static Character.UnicodeScript LEPCHA (java 9)
-
static Character.UnicodeScript LIMBU (java 9)
-
static Character.UnicodeScript LINEAR_B (java 9)
-
static Character.UnicodeScript LISU (java 9)
-
static Character.UnicodeScript LYCIAN (java 9)
-
static Character.UnicodeScript LYDIAN (java 9)
-
static Character.UnicodeScript MALAYALAM (java 9)
-
static Character.UnicodeScript MANDAIC (java 9)
-
static Character.UnicodeScript MEETEI_MAYEK (java 9)
-
static Character.UnicodeScript MEROITIC_HIEROGLYPHS (java 9)
-
static Character.UnicodeScript MIAO (java 9)
-
static Character.UnicodeScript MONGOLIAN (java 9)
-
static Character.UnicodeScript MYANMAR (java 9)
-
static Character.UnicodeScript NEW_TAI_LUE (java 9)
-
static Character.UnicodeScript NKO (java 9)
-
static Character.UnicodeScript OGHAM (java 9)
-
static Character.UnicodeScript OLD_ITALIC (java 9)
-
static Character.UnicodeScript OLD_PERSIAN (java 9)
-
static Character.UnicodeScript OLD_TURKIC (java 9)
-
static Character.UnicodeScript OL_CHIKI (java 9)
-
static Character.UnicodeScript ORIYA (java 9)
-
static Character.UnicodeScript OSMANYA (java 9)
-
static Character.UnicodeScript PHAGS_PA (java 9)
-
static Character.UnicodeScript PHOENICIAN (java 9)
-
static Character.UnicodeScript REJANG (java 9)
-
static Character.UnicodeScript RUNIC (java 9)
-
static Character.UnicodeScript SAMARITAN (java 9)
-
static Character.UnicodeScript SAURASHTRA (java 9)
-
static Character.UnicodeScript SHARADA (java 9)
-
static Character.UnicodeScript SHAVIAN (java 9)
-
static Character.UnicodeScript SINHALA (java 9)
-
static Character.UnicodeScript SORA_SOMPENG (java 9)
-
static Character.UnicodeScript SUNDANESE (java 9)
-
static Character.UnicodeScript SYLOTI_NAGRI (java 9)
-
static Character.UnicodeScript SYRIAC (java 9)
-
static Character.UnicodeScript TAGALOG (java 9)
-
static Character.UnicodeScript TAGBANWA (java 9)
-
static Character.UnicodeScript TAI_LE (java 9)
-
static Character.UnicodeScript TAI_THAM (java 9)
-
static Character.UnicodeScript TAI_VIET (java 9)
-
static Character.UnicodeScript TAKRI (java 9)
-
static Character.UnicodeScript TAMIL (java 9)
-
static Character.UnicodeScript TELUGU (java 9)
-
static Character.UnicodeScript THAANA (java 9)
-
static Character.UnicodeScript THAI (java 9)
-
static Character.UnicodeScript TIBETAN (java 9)
-
static Character.UnicodeScript TIFINAGH (java 9)
-
static Character.UnicodeScript UGARITIC (java 9)
-
static Character.UnicodeScript UNKNOWN (java 9)
-
static Character.UnicodeScript VAI (java 9)
-
static Character.UnicodeScript YI (java 9)
-
[[painless-api-reference-Character-UnicodeScript-forName-1]]static <<painless-api-reference-Character-UnicodeScript,Character.UnicodeScript>> link:{java8-javadoc}/java/lang/Character.UnicodeScript.html#forName%2Djava.lang.String%2D[forName](<<painless-api-reference-String,String>>) (java 9)
-
[[painless-api-reference-Character-UnicodeScript-of-1]]static <<painless-api-reference-Character-UnicodeScript,Character.UnicodeScript>> link:{java8-javadoc}/java/lang/Character.UnicodeScript.html#of%2Dint%2D[of](int) (java 9)
-
[[painless-api-reference-Character-UnicodeScript-valueOf-1]]static <<painless-api-reference-Character-UnicodeScript,Character.UnicodeScript>> link:{java8-javadoc}/java/lang/Character.UnicodeScript.html#valueOf%2Djava.lang.String%2D[valueOf](<<painless-api-reference-String,String>>) (java 9)
-
[[painless-api-reference-Character-UnicodeScript-values-0]]static <<painless-api-reference-Character-UnicodeScript,Character.UnicodeScript>>[] link:{java8-javadoc}/java/lang/Character.UnicodeScript.html#values%2D%2D[values]() (java 9)
-
Inherits methods from <<painless-api-reference-Enum,Enum>>, <<painless-api-reference-Object,Object>>
-
-
- CharacterIterator
-
-
-
[[painless-api-reference-CharacterIterator-clone-0]]def link:{java8-javadoc}/java/text/CharacterIterator.html#clone%2D%2D[clone]() (java 9)
-
[[painless-api-reference-CharacterIterator-current-0]]char link:{java8-javadoc}/java/text/CharacterIterator.html#current%2D%2D[current]() (java 9)
-
[[painless-api-reference-CharacterIterator-first-0]]char link:{java8-javadoc}/java/text/CharacterIterator.html#first%2D%2D[first]() (java 9)
-
[[painless-api-reference-CharacterIterator-getBeginIndex-0]]int link:{java8-javadoc}/java/text/CharacterIterator.html#getBeginIndex%2D%2D[getBeginIndex]() (java 9)
-
[[painless-api-reference-CharacterIterator-getEndIndex-0]]int link:{java8-javadoc}/java/text/CharacterIterator.html#getEndIndex%2D%2D[getEndIndex]() (java 9)
-
[[painless-api-reference-CharacterIterator-getIndex-0]]int link:{java8-javadoc}/java/text/CharacterIterator.html#getIndex%2D%2D[getIndex]() (java 9)
-
[[painless-api-reference-CharacterIterator-last-0]]char link:{java8-javadoc}/java/text/CharacterIterator.html#last%2D%2D[last]() (java 9)
-
[[painless-api-reference-CharacterIterator-next-0]]char link:{java8-javadoc}/java/text/CharacterIterator.html#next%2D%2D[next]() (java 9)
-
[[painless-api-reference-CharacterIterator-previous-0]]char link:{java8-javadoc}/java/text/CharacterIterator.html#previous%2D%2D[previous]() (java 9)
-
[[painless-api-reference-CharacterIterator-setIndex-1]]char link:{java8-javadoc}/java/text/CharacterIterator.html#setIndex%2Dint%2D[setIndex](int) (java 9)
-
Inherits methods from <<painless-api-reference-Object,Object>>
-
-
- ChoiceFormat
-
-
[[painless-api-reference-ChoiceFormat-nextDouble-1]]static double link:{java8-javadoc}/java/text/ChoiceFormat.html#nextDouble%2Ddouble%2D[nextDouble](double) (java 9)
-
[[painless-api-reference-ChoiceFormat-nextDouble-2]]static double link:{java8-javadoc}/java/text/ChoiceFormat.html#nextDouble%2Ddouble%2Dboolean%2D[nextDouble](double, boolean) (java 9)
-
[[painless-api-reference-ChoiceFormat-previousDouble-1]]static double link:{java8-javadoc}/java/text/ChoiceFormat.html#previousDouble%2Ddouble%2D[previousDouble](double) (java 9)
-
[[painless-api-reference-ChoiceFormat-ChoiceFormat-1]]link:{java8-javadoc}/java/text/ChoiceFormat.html#ChoiceFormat%2Djava.lang.String%2D[ChoiceFormat](<<painless-api-reference-String,String>>) (java 9)
-
[[painless-api-reference-ChoiceFormat-ChoiceFormat-2]]link:{java8-javadoc}/java/text/ChoiceFormat.html#ChoiceFormat%2Ddouble:A%2Djava.lang.String:A%2D[ChoiceFormat](double[], <<painless-api-reference-String,String>>[]) (java 9)
-
[[painless-api-reference-ChoiceFormat-applyPattern-1]]void link:{java8-javadoc}/java/text/ChoiceFormat.html#applyPattern%2Djava.lang.String%2D[applyPattern](<<painless-api-reference-String,String>>) (java 9)
-
[[painless-api-reference-ChoiceFormat-getFormats-0]]def[] link:{java8-javadoc}/java/text/ChoiceFormat.html#getFormats%2D%2D[getFormats]() (java 9)
-
[[painless-api-reference-ChoiceFormat-getLimits-0]]double[] link:{java8-javadoc}/java/text/ChoiceFormat.html#getLimits%2D%2D[getLimits]() (java 9)
-
[[painless-api-reference-ChoiceFormat-setChoices-2]]void link:{java8-javadoc}/java/text/ChoiceFormat.html#setChoices%2Ddouble:A%2Djava.lang.String:A%2D[setChoices](double[], <<painless-api-reference-String,String>>[]) (java 9)
-
[[painless-api-reference-ChoiceFormat-toPattern-0]]<<painless-api-reference-String,String>> link:{java8-javadoc}/java/text/ChoiceFormat.html#toPattern%2D%2D[toPattern]() (java 9)
-
Inherits methods from <<painless-api-reference-Format,Format>>, <<painless-api-reference-NumberFormat,NumberFormat>>, <<painless-api-reference-Object,Object>>
-
- ChronoField
-
-
static ChronoField ALIGNED_DAY_OF_WEEK_IN_YEAR (java 9)
-
static ChronoField ALIGNED_WEEK_OF_MONTH (java 9)
-
static ChronoField ALIGNED_WEEK_OF_YEAR (java 9)
-
static ChronoField AMPM_OF_DAY (java 9)
-
static ChronoField CLOCK_HOUR_OF_AMPM (java 9)
-
static ChronoField CLOCK_HOUR_OF_DAY (java 9)
-
static ChronoField DAY_OF_MONTH (java 9)
-
static ChronoField DAY_OF_WEEK (java 9)
-
static ChronoField DAY_OF_YEAR (java 9)
-
static ChronoField EPOCH_DAY (java 9)
-
static ChronoField ERA (java 9)
-
static ChronoField HOUR_OF_AMPM (java 9)
-
static ChronoField HOUR_OF_DAY (java 9)
-
static ChronoField INSTANT_SECONDS (java 9)
-
static ChronoField MICRO_OF_DAY (java 9)
-
static ChronoField MICRO_OF_SECOND (java 9)
-
static ChronoField MILLI_OF_DAY (java 9)
-
static ChronoField MILLI_OF_SECOND (java 9)
-
static ChronoField MINUTE_OF_DAY (java 9)
-
static ChronoField MINUTE_OF_HOUR (java 9)
-
static ChronoField MONTH_OF_YEAR (java 9)
-
static ChronoField NANO_OF_DAY (java 9)
-
static ChronoField NANO_OF_SECOND (java 9)
-
static ChronoField OFFSET_SECONDS (java 9)
-
static ChronoField PROLEPTIC_MONTH (java 9)
-
static ChronoField SECOND_OF_DAY (java 9)
-
static ChronoField SECOND_OF_MINUTE (java 9)
-
static ChronoField YEAR (java 9)
-
static ChronoField YEAR_OF_ERA (java 9)
-
[[painless-api-reference-ChronoField-valueOf-1]]static <<painless-api-reference-ChronoField,ChronoField>> link:{java8-javadoc}/java/time/temporal/ChronoField.html#valueOf%2Djava.lang.String%2D[valueOf](<<painless-api-reference-String,String>>) (java 9)
-
[[painless-api-reference-ChronoField-values-0]]static <<painless-api-reference-ChronoField,ChronoField>>[] link:{java8-javadoc}/java/time/temporal/ChronoField.html#values%2D%2D[values]() (java 9)
-
[[painless-api-reference-ChronoField-checkValidIntValue-1]]int link:{java8-javadoc}/java/time/temporal/ChronoField.html#checkValidIntValue%2Dlong%2D[checkValidIntValue](long) (java 9)
-
[[painless-api-reference-ChronoField-checkValidValue-1]]long link:{java8-javadoc}/java/time/temporal/ChronoField.html#checkValidValue%2Dlong%2D[checkValidValue](long) (java 9)
-
Inherits methods from <<painless-api-reference-Enum,Enum>>, <<painless-api-reference-Object,Object>>, <<painless-api-reference-TemporalField,TemporalField>>
-
- ChronoLocalDate
-
-
[[painless-api-reference-ChronoLocalDate-from-1]]static <<painless-api-reference-ChronoLocalDate,ChronoLocalDate>> link:{java8-javadoc}/java/time/chrono/ChronoLocalDate.html#from%2Djava.time.temporal.TemporalAccessor%2D[from](<<painless-api-reference-TemporalAccessor,TemporalAccessor>>) (java 9)
-
[[painless-api-reference-ChronoLocalDate-timeLineOrder-0]]static <<painless-api-reference-Comparator,Comparator>> link:{java8-javadoc}/java/time/chrono/ChronoLocalDate.html#timeLineOrder%2D%2D[timeLineOrder]() (java 9)
-
[[painless-api-reference-ChronoLocalDate-atTime-1]]<<painless-api-reference-ChronoLocalDateTime,ChronoLocalDateTime>> link:{java8-javadoc}/java/time/chrono/ChronoLocalDate.html#atTime%2Djava.time.LocalTime%2D[atTime](<<painless-api-reference-LocalTime,LocalTime>>) (java 9)
-
[[painless-api-reference-ChronoLocalDate-compareTo-1]]int link:{java8-javadoc}/java/time/chrono/ChronoLocalDate.html#compareTo%2Djava.time.chrono.ChronoLocalDate%2D[compareTo](<<painless-api-reference-ChronoLocalDate,ChronoLocalDate>>) (java 9)
-
[[painless-api-reference-ChronoLocalDate-equals-1]]boolean link:{java8-javadoc}/java/time/chrono/ChronoLocalDate.html#equals%2Djava.lang.Object%2D[equals](<<painless-api-reference-Object,Object>>) (java 9)
-
[[painless-api-reference-ChronoLocalDate-format-1]]<<painless-api-reference-String,String>> link:{java8-javadoc}/java/time/chrono/ChronoLocalDate.html#format%2Djava.time.format.DateTimeFormatter%2D[format](<<painless-api-reference-DateTimeFormatter,DateTimeFormatter>>) (java 9)
-
[[painless-api-reference-ChronoLocalDate-getChronology-0]]<<painless-api-reference-Chronology,Chronology>> link:{java8-javadoc}/java/time/chrono/ChronoLocalDate.html#getChronology%2D%2D[getChronology]() (java 9)
-
[[painless-api-reference-ChronoLocalDate-getEra-0]]<<painless-api-reference-Era,Era>> link:{java8-javadoc}/java/time/chrono/ChronoLocalDate.html#getEra%2D%2D[getEra]() (java 9)
-
[[painless-api-reference-ChronoLocalDate-hashCode-0]]int link:{java8-javadoc}/java/time/chrono/ChronoLocalDate.html#hashCode%2D%2D[hashCode]() (java 9)
-
[[painless-api-reference-ChronoLocalDate-isAfter-1]]boolean link:{java8-javadoc}/java/time/chrono/ChronoLocalDate.html#isAfter%2Djava.time.chrono.ChronoLocalDate%2D[isAfter](<<painless-api-reference-ChronoLocalDate,ChronoLocalDate>>) (java 9)
-
[[painless-api-reference-ChronoLocalDate-isBefore-1]]boolean link:{java8-javadoc}/java/time/chrono/ChronoLocalDate.html#isBefore%2Djava.time.chrono.ChronoLocalDate%2D[isBefore](<<painless-api-reference-ChronoLocalDate,ChronoLocalDate>>) (java 9)
-
[[painless-api-reference-ChronoLocalDate-isEqual-1]]boolean link:{java8-javadoc}/java/time/chrono/ChronoLocalDate.html#isEqual%2Djava.time.chrono.ChronoLocalDate%2D[isEqual](<<painless-api-reference-ChronoLocalDate,ChronoLocalDate>>) (java 9)
-
[[painless-api-reference-ChronoLocalDate-isLeapYear-0]]boolean link:{java8-javadoc}/java/time/chrono/ChronoLocalDate.html#isLeapYear%2D%2D[isLeapYear]() (java 9)
-
[[painless-api-reference-ChronoLocalDate-lengthOfMonth-0]]int link:{java8-javadoc}/java/time/chrono/ChronoLocalDate.html#lengthOfMonth%2D%2D[lengthOfMonth]() (java 9)
-
[[painless-api-reference-ChronoLocalDate-lengthOfYear-0]]int link:{java8-javadoc}/java/time/chrono/ChronoLocalDate.html#lengthOfYear%2D%2D[lengthOfYear]() (java 9)
-
[[painless-api-reference-ChronoLocalDate-minus-1]]<<painless-api-reference-ChronoLocalDate,ChronoLocalDate>> link:{java8-javadoc}/java/time/chrono/ChronoLocalDate.html#minus%2Djava.time.temporal.TemporalAmount%2D[minus](<<painless-api-reference-TemporalAmount,TemporalAmount>>) (java 9)
-
[[painless-api-reference-ChronoLocalDate-minus-2]]<<painless-api-reference-ChronoLocalDate,ChronoLocalDate>> link:{java8-javadoc}/java/time/chrono/ChronoLocalDate.html#minus%2Dlong%2Djava.time.temporal.TemporalUnit%2D[minus](long, <<painless-api-reference-TemporalUnit,TemporalUnit>>) (java 9)
-
[[painless-api-reference-ChronoLocalDate-plus-1]]<<painless-api-reference-ChronoLocalDate,ChronoLocalDate>> link:{java8-javadoc}/java/time/chrono/ChronoLocalDate.html#plus%2Djava.time.temporal.TemporalAmount%2D[plus](<<painless-api-reference-TemporalAmount,TemporalAmount>>) (java 9)
-
[[painless-api-reference-ChronoLocalDate-plus-2]]<<painless-api-reference-ChronoLocalDate,ChronoLocalDate>> link:{java8-javadoc}/java/time/chrono/ChronoLocalDate.html#plus%2Dlong%2Djava.time.temporal.TemporalUnit%2D[plus](long, <<painless-api-reference-TemporalUnit,TemporalUnit>>) (java 9)
-
[[painless-api-reference-ChronoLocalDate-toEpochDay-0]]long link:{java8-javadoc}/java/time/chrono/ChronoLocalDate.html#toEpochDay%2D%2D[toEpochDay]() (java 9)
-
[[painless-api-reference-ChronoLocalDate-toString-0]]<<painless-api-reference-String,String>> link:{java8-javadoc}/java/time/chrono/ChronoLocalDate.html#toString%2D%2D[toString]() (java 9)
-
[[painless-api-reference-ChronoLocalDate-until-1]]<<painless-api-reference-ChronoPeriod,ChronoPeriod>> link:{java8-javadoc}/java/time/chrono/ChronoLocalDate.html#until%2Djava.time.chrono.ChronoLocalDate%2D[until](<<painless-api-reference-ChronoLocalDate,ChronoLocalDate>>) (java 9)
-
[[painless-api-reference-ChronoLocalDate-with-1]]<<painless-api-reference-ChronoLocalDate,ChronoLocalDate>> link:{java8-javadoc}/java/time/chrono/ChronoLocalDate.html#with%2Djava.time.temporal.TemporalAdjuster%2D[with](<<painless-api-reference-TemporalAdjuster,TemporalAdjuster>>) (java 9)
-
[[painless-api-reference-ChronoLocalDate-with-2]]<<painless-api-reference-ChronoLocalDate,ChronoLocalDate>> link:{java8-javadoc}/java/time/chrono/ChronoLocalDate.html#with%2Djava.time.temporal.TemporalField%2Dlong%2D[with](<<painless-api-reference-TemporalField,TemporalField>>, long) (java 9)
-
Inherits methods from <<painless-api-reference-Temporal,Temporal>>, <<painless-api-reference-TemporalAccessor,TemporalAccessor>>, <<painless-api-reference-TemporalAdjuster,TemporalAdjuster>>
-
- ChronoLocalDateTime
-
-
[[painless-api-reference-ChronoLocalDateTime-from-1]]static <<painless-api-reference-ChronoLocalDateTime,ChronoLocalDateTime>> link:{java8-javadoc}/java/time/chrono/ChronoLocalDateTime.html#from%2Djava.time.temporal.TemporalAccessor%2D[from](<<painless-api-reference-TemporalAccessor,TemporalAccessor>>) (java 9)
-
[[painless-api-reference-ChronoLocalDateTime-timeLineOrder-0]]static <<painless-api-reference-Comparator,Comparator>> link:{java8-javadoc}/java/time/chrono/ChronoLocalDateTime.html#timeLineOrder%2D%2D[timeLineOrder]() (java 9)
-
[[painless-api-reference-ChronoLocalDateTime-atZone-1]]<<painless-api-reference-ChronoZonedDateTime,ChronoZonedDateTime>> link:{java8-javadoc}/java/time/chrono/ChronoLocalDateTime.html#atZone%2Djava.time.ZoneId%2D[atZone](<<painless-api-reference-ZoneId,ZoneId>>) (java 9)
-
[[painless-api-reference-ChronoLocalDateTime-compareTo-1]]int link:{java8-javadoc}/java/time/chrono/ChronoLocalDateTime.html#compareTo%2Djava.time.chrono.ChronoLocalDateTime%2D[compareTo](<<painless-api-reference-ChronoLocalDateTime,ChronoLocalDateTime>>) (java 9)
-
[[painless-api-reference-ChronoLocalDateTime-equals-1]]boolean link:{java8-javadoc}/java/time/chrono/ChronoLocalDateTime.html#equals%2Djava.lang.Object%2D[equals](<<painless-api-reference-Object,Object>>) (java 9)
-
[[painless-api-reference-ChronoLocalDateTime-format-1]]<<painless-api-reference-String,String>> link:{java8-javadoc}/java/time/chrono/ChronoLocalDateTime.html#format%2Djava.time.format.DateTimeFormatter%2D[format](<<painless-api-reference-DateTimeFormatter,DateTimeFormatter>>) (java 9)
-
[[painless-api-reference-ChronoLocalDateTime-getChronology-0]]<<painless-api-reference-Chronology,Chronology>> link:{java8-javadoc}/java/time/chrono/ChronoLocalDateTime.html#getChronology%2D%2D[getChronology]() (java 9)
-
[[painless-api-reference-ChronoLocalDateTime-hashCode-0]]int link:{java8-javadoc}/java/time/chrono/ChronoLocalDateTime.html#hashCode%2D%2D[hashCode]() (java 9)
-
[[painless-api-reference-ChronoLocalDateTime-isAfter-1]]boolean link:{java8-javadoc}/java/time/chrono/ChronoLocalDateTime.html#isAfter%2Djava.time.chrono.ChronoLocalDateTime%2D[isAfter](<<painless-api-reference-ChronoLocalDateTime,ChronoLocalDateTime>>) (java 9)
-
[[painless-api-reference-ChronoLocalDateTime-isBefore-1]]boolean link:{java8-javadoc}/java/time/chrono/ChronoLocalDateTime.html#isBefore%2Djava.time.chrono.ChronoLocalDateTime%2D[isBefore](<<painless-api-reference-ChronoLocalDateTime,ChronoLocalDateTime>>) (java 9)
-
[[painless-api-reference-ChronoLocalDateTime-isEqual-1]]boolean link:{java8-javadoc}/java/time/chrono/ChronoLocalDateTime.html#isEqual%2Djava.time.chrono.ChronoLocalDateTime%2D[isEqual](<<painless-api-reference-ChronoLocalDateTime,ChronoLocalDateTime>>) (java 9)
-
[[painless-api-reference-ChronoLocalDateTime-minus-1]]<<painless-api-reference-ChronoLocalDateTime,ChronoLocalDateTime>> link:{java8-javadoc}/java/time/chrono/ChronoLocalDateTime.html#minus%2Djava.time.temporal.TemporalAmount%2D[minus](<<painless-api-reference-TemporalAmount,TemporalAmount>>) (java 9)
-
[[painless-api-reference-ChronoLocalDateTime-minus-2]]<<painless-api-reference-ChronoLocalDateTime,ChronoLocalDateTime>> link:{java8-javadoc}/java/time/chrono/ChronoLocalDateTime.html#minus%2Dlong%2Djava.time.temporal.TemporalUnit%2D[minus](long, <<painless-api-reference-TemporalUnit,TemporalUnit>>) (java 9)
-
[[painless-api-reference-ChronoLocalDateTime-plus-1]]<<painless-api-reference-ChronoLocalDateTime,ChronoLocalDateTime>> link:{java8-javadoc}/java/time/chrono/ChronoLocalDateTime.html#plus%2Djava.time.temporal.TemporalAmount%2D[plus](<<painless-api-reference-TemporalAmount,TemporalAmount>>) (java 9)
-
[[painless-api-reference-ChronoLocalDateTime-plus-2]]<<painless-api-reference-ChronoLocalDateTime,ChronoLocalDateTime>> link:{java8-javadoc}/java/time/chrono/ChronoLocalDateTime.html#plus%2Dlong%2Djava.time.temporal.TemporalUnit%2D[plus](long, <<painless-api-reference-TemporalUnit,TemporalUnit>>) (java 9)
-
[[painless-api-reference-ChronoLocalDateTime-toEpochSecond-1]]long link:{java8-javadoc}/java/time/chrono/ChronoLocalDateTime.html#toEpochSecond%2Djava.time.ZoneOffset%2D[toEpochSecond](<<painless-api-reference-ZoneOffset,ZoneOffset>>) (java 9)
-
[[painless-api-reference-ChronoLocalDateTime-toInstant-1]]<<painless-api-reference-Instant,Instant>> link:{java8-javadoc}/java/time/chrono/ChronoLocalDateTime.html#toInstant%2Djava.time.ZoneOffset%2D[toInstant](<<painless-api-reference-ZoneOffset,ZoneOffset>>) (java 9)
-
[[painless-api-reference-ChronoLocalDateTime-toLocalDate-0]]<<painless-api-reference-ChronoLocalDate,ChronoLocalDate>> link:{java8-javadoc}/java/time/chrono/ChronoLocalDateTime.html#toLocalDate%2D%2D[toLocalDate]() (java 9)
-
[[painless-api-reference-ChronoLocalDateTime-toLocalTime-0]]<<painless-api-reference-LocalTime,LocalTime>> link:{java8-javadoc}/java/time/chrono/ChronoLocalDateTime.html#toLocalTime%2D%2D[toLocalTime]() (java 9)
-
[[painless-api-reference-ChronoLocalDateTime-toString-0]]<<painless-api-reference-String,String>> link:{java8-javadoc}/java/time/chrono/ChronoLocalDateTime.html#toString%2D%2D[toString]() (java 9)
-
[[painless-api-reference-ChronoLocalDateTime-with-1]]<<painless-api-reference-ChronoLocalDateTime,ChronoLocalDateTime>> link:{java8-javadoc}/java/time/chrono/ChronoLocalDateTime.html#with%2Djava.time.temporal.TemporalAdjuster%2D[with](<<painless-api-reference-TemporalAdjuster,TemporalAdjuster>>) (java 9)
-
[[painless-api-reference-ChronoLocalDateTime-with-2]]<<painless-api-reference-ChronoLocalDateTime,ChronoLocalDateTime>> link:{java8-javadoc}/java/time/chrono/ChronoLocalDateTime.html#with%2Djava.time.temporal.TemporalField%2Dlong%2D[with](<<painless-api-reference-TemporalField,TemporalField>>, long) (java 9)
-
Inherits methods from <<painless-api-reference-Temporal,Temporal>>, <<painless-api-reference-TemporalAccessor,TemporalAccessor>>, <<painless-api-reference-TemporalAdjuster,TemporalAdjuster>>
-
- ChronoPeriod
-
-
[[painless-api-reference-ChronoPeriod-between-2]]static <<painless-api-reference-ChronoPeriod,ChronoPeriod>> link:{java8-javadoc}/java/time/chrono/ChronoPeriod.html#between%2Djava.time.chrono.ChronoLocalDate%2Djava.time.chrono.ChronoLocalDate%2D[between](<<painless-api-reference-ChronoLocalDate,ChronoLocalDate>>, <<painless-api-reference-ChronoLocalDate,ChronoLocalDate>>) (java 9)
-
[[painless-api-reference-ChronoPeriod-equals-1]]boolean link:{java8-javadoc}/java/time/chrono/ChronoPeriod.html#equals%2Djava.lang.Object%2D[equals](<<painless-api-reference-Object,Object>>) (java 9)
-
[[painless-api-reference-ChronoPeriod-getChronology-0]]<<painless-api-reference-Chronology,Chronology>> link:{java8-javadoc}/java/time/chrono/ChronoPeriod.html#getChronology%2D%2D[getChronology]() (java 9)
-
[[painless-api-reference-ChronoPeriod-getUnits-0]]<<painless-api-reference-List,List>> link:{java8-javadoc}/java/time/chrono/ChronoPeriod.html#getUnits%2D%2D[getUnits]() (java 9)
-
[[painless-api-reference-ChronoPeriod-hashCode-0]]int link:{java8-javadoc}/java/time/chrono/ChronoPeriod.html#hashCode%2D%2D[hashCode]() (java 9)
-
[[painless-api-reference-ChronoPeriod-isNegative-0]]boolean link:{java8-javadoc}/java/time/chrono/ChronoPeriod.html#isNegative%2D%2D[isNegative]() (java 9)
-
[[painless-api-reference-ChronoPeriod-isZero-0]]boolean link:{java8-javadoc}/java/time/chrono/ChronoPeriod.html#isZero%2D%2D[isZero]() (java 9)
-
[[painless-api-reference-ChronoPeriod-minus-1]]<<painless-api-reference-ChronoPeriod,ChronoPeriod>> link:{java8-javadoc}/java/time/chrono/ChronoPeriod.html#minus%2Djava.time.temporal.TemporalAmount%2D[minus](<<painless-api-reference-TemporalAmount,TemporalAmount>>) (java 9)
-
[[painless-api-reference-ChronoPeriod-multipliedBy-1]]<<painless-api-reference-ChronoPeriod,ChronoPeriod>> link:{java8-javadoc}/java/time/chrono/ChronoPeriod.html#multipliedBy%2Dint%2D[multipliedBy](int) (java 9)
-
[[painless-api-reference-ChronoPeriod-negated-0]]<<painless-api-reference-ChronoPeriod,ChronoPeriod>> link:{java8-javadoc}/java/time/chrono/ChronoPeriod.html#negated%2D%2D[negated]() (java 9)
-
[[painless-api-reference-ChronoPeriod-normalized-0]]<<painless-api-reference-ChronoPeriod,ChronoPeriod>> link:{java8-javadoc}/java/time/chrono/ChronoPeriod.html#normalized%2D%2D[normalized]() (java 9)
-
[[painless-api-reference-ChronoPeriod-plus-1]]<<painless-api-reference-ChronoPeriod,ChronoPeriod>> link:{java8-javadoc}/java/time/chrono/ChronoPeriod.html#plus%2Djava.time.temporal.TemporalAmount%2D[plus](<<painless-api-reference-TemporalAmount,TemporalAmount>>) (java 9)
-
[[painless-api-reference-ChronoPeriod-toString-0]]<<painless-api-reference-String,String>> link:{java8-javadoc}/java/time/chrono/ChronoPeriod.html#toString%2D%2D[toString]() (java 9)
-
Inherits methods from <<painless-api-reference-TemporalAmount,TemporalAmount>>
-
- ChronoUnit
-
-
static ChronoUnit CENTURIES (java 9)
-
static ChronoUnit DAYS (java 9)
-
static ChronoUnit DECADES (java 9)
-
static ChronoUnit ERAS (java 9)
-
static ChronoUnit FOREVER (java 9)
-
static ChronoUnit HALF_DAYS (java 9)
-
static ChronoUnit HOURS (java 9)
-
static ChronoUnit MICROS (java 9)
-
static ChronoUnit MILLENNIA (java 9)
-
static ChronoUnit MILLIS (java 9)
-
static ChronoUnit MINUTES (java 9)
-
static ChronoUnit MONTHS (java 9)
-
static ChronoUnit NANOS (java 9)
-
static ChronoUnit SECONDS (java 9)
-
static ChronoUnit WEEKS (java 9)
-
static ChronoUnit YEARS (java 9)
-
[[painless-api-reference-ChronoUnit-valueOf-1]]static <<painless-api-reference-ChronoUnit,ChronoUnit>> link:{java8-javadoc}/java/time/temporal/ChronoUnit.html#valueOf%2Djava.lang.String%2D[valueOf](<<painless-api-reference-String,String>>) (java 9)
-
[[painless-api-reference-ChronoUnit-values-0]]static <<painless-api-reference-ChronoUnit,ChronoUnit>>[] link:{java8-javadoc}/java/time/temporal/ChronoUnit.html#values%2D%2D[values]() (java 9)
-
Inherits methods from <<painless-api-reference-Enum,Enum>>, <<painless-api-reference-Object,Object>>, <<painless-api-reference-TemporalUnit,TemporalUnit>>
-
-
- ChronoZonedDateTime
-
-
[[painless-api-reference-ChronoZonedDateTime-from-1]]static <<painless-api-reference-ChronoZonedDateTime,ChronoZonedDateTime>> link:{java8-javadoc}/java/time/chrono/ChronoZonedDateTime.html#from%2Djava.time.temporal.TemporalAccessor%2D[from](<<painless-api-reference-TemporalAccessor,TemporalAccessor>>) (java 9)
-
[[painless-api-reference-ChronoZonedDateTime-timeLineOrder-0]]static <<painless-api-reference-Comparator,Comparator>> link:{java8-javadoc}/java/time/chrono/ChronoZonedDateTime.html#timeLineOrder%2D%2D[timeLineOrder]() (java 9)
-
[[painless-api-reference-ChronoZonedDateTime-compareTo-1]]int link:{java8-javadoc}/java/time/chrono/ChronoZonedDateTime.html#compareTo%2Djava.time.chrono.ChronoZonedDateTime%2D[compareTo](<<painless-api-reference-ChronoZonedDateTime,ChronoZonedDateTime>>) (java 9)
-
[[painless-api-reference-ChronoZonedDateTime-equals-1]]boolean link:{java8-javadoc}/java/time/chrono/ChronoZonedDateTime.html#equals%2Djava.lang.Object%2D[equals](<<painless-api-reference-Object,Object>>) (java 9)
-
[[painless-api-reference-ChronoZonedDateTime-format-1]]<<painless-api-reference-String,String>> link:{java8-javadoc}/java/time/chrono/ChronoZonedDateTime.html#format%2Djava.time.format.DateTimeFormatter%2D[format](<<painless-api-reference-DateTimeFormatter,DateTimeFormatter>>) (java 9)
-
[[painless-api-reference-ChronoZonedDateTime-getChronology-0]]<<painless-api-reference-Chronology,Chronology>> link:{java8-javadoc}/java/time/chrono/ChronoZonedDateTime.html#getChronology%2D%2D[getChronology]() (java 9)
-
[[painless-api-reference-ChronoZonedDateTime-getOffset-0]]<<painless-api-reference-ZoneOffset,ZoneOffset>> link:{java8-javadoc}/java/time/chrono/ChronoZonedDateTime.html#getOffset%2D%2D[getOffset]() (java 9)
-
[[painless-api-reference-ChronoZonedDateTime-getZone-0]]<<painless-api-reference-ZoneId,ZoneId>> link:{java8-javadoc}/java/time/chrono/ChronoZonedDateTime.html#getZone%2D%2D[getZone]() (java 9)
-
[[painless-api-reference-ChronoZonedDateTime-hashCode-0]]int link:{java8-javadoc}/java/time/chrono/ChronoZonedDateTime.html#hashCode%2D%2D[hashCode]() (java 9)
-
[[painless-api-reference-ChronoZonedDateTime-isAfter-1]]boolean link:{java8-javadoc}/java/time/chrono/ChronoZonedDateTime.html#isAfter%2Djava.time.chrono.ChronoZonedDateTime%2D[isAfter](<<painless-api-reference-ChronoZonedDateTime,ChronoZonedDateTime>>) (java 9)
-
[[painless-api-reference-ChronoZonedDateTime-isBefore-1]]boolean link:{java8-javadoc}/java/time/chrono/ChronoZonedDateTime.html#isBefore%2Djava.time.chrono.ChronoZonedDateTime%2D[isBefore](<<painless-api-reference-ChronoZonedDateTime,ChronoZonedDateTime>>) (java 9)
-
[[painless-api-reference-ChronoZonedDateTime-isEqual-1]]boolean link:{java8-javadoc}/java/time/chrono/ChronoZonedDateTime.html#isEqual%2Djava.time.chrono.ChronoZonedDateTime%2D[isEqual](<<painless-api-reference-ChronoZonedDateTime,ChronoZonedDateTime>>) (java 9)
-
[[painless-api-reference-ChronoZonedDateTime-minus-1]]<<painless-api-reference-ChronoZonedDateTime,ChronoZonedDateTime>> link:{java8-javadoc}/java/time/chrono/ChronoZonedDateTime.html#minus%2Djava.time.temporal.TemporalAmount%2D[minus](<<painless-api-reference-TemporalAmount,TemporalAmount>>) (java 9)
-
[[painless-api-reference-ChronoZonedDateTime-minus-2]]<<painless-api-reference-ChronoZonedDateTime,ChronoZonedDateTime>> link:{java8-javadoc}/java/time/chrono/ChronoZonedDateTime.html#minus%2Dlong%2Djava.time.temporal.TemporalUnit%2D[minus](long, <<painless-api-reference-TemporalUnit,TemporalUnit>>) (java 9)
-
[[painless-api-reference-ChronoZonedDateTime-plus-1]]<<painless-api-reference-ChronoZonedDateTime,ChronoZonedDateTime>> link:{java8-javadoc}/java/time/chrono/ChronoZonedDateTime.html#plus%2Djava.time.temporal.TemporalAmount%2D[plus](<<painless-api-reference-TemporalAmount,TemporalAmount>>) (java 9)
-
[[painless-api-reference-ChronoZonedDateTime-plus-2]]<<painless-api-reference-ChronoZonedDateTime,ChronoZonedDateTime>> link:{java8-javadoc}/java/time/chrono/ChronoZonedDateTime.html#plus%2Dlong%2Djava.time.temporal.TemporalUnit%2D[plus](long, <<painless-api-reference-TemporalUnit,TemporalUnit>>) (java 9)
-
[[painless-api-reference-ChronoZonedDateTime-toEpochSecond-0]]long link:{java8-javadoc}/java/time/chrono/ChronoZonedDateTime.html#toEpochSecond%2D%2D[toEpochSecond]() (java 9)
-
[[painless-api-reference-ChronoZonedDateTime-toInstant-0]]<<painless-api-reference-Instant,Instant>> link:{java8-javadoc}/java/time/chrono/ChronoZonedDateTime.html#toInstant%2D%2D[toInstant]() (java 9)
-
[[painless-api-reference-ChronoZonedDateTime-toLocalDate-0]]<<painless-api-reference-ChronoLocalDate,ChronoLocalDate>> link:{java8-javadoc}/java/time/chrono/ChronoZonedDateTime.html#toLocalDate%2D%2D[toLocalDate]() (java 9)
-
[[painless-api-reference-ChronoZonedDateTime-toLocalDateTime-0]]<<painless-api-reference-ChronoLocalDateTime,ChronoLocalDateTime>> link:{java8-javadoc}/java/time/chrono/ChronoZonedDateTime.html#toLocalDateTime%2D%2D[toLocalDateTime]() (java 9)
-
[[painless-api-reference-ChronoZonedDateTime-toLocalTime-0]]<<painless-api-reference-LocalTime,LocalTime>> link:{java8-javadoc}/java/time/chrono/ChronoZonedDateTime.html#toLocalTime%2D%2D[toLocalTime]() (java 9)
-
[[painless-api-reference-ChronoZonedDateTime-toString-0]]<<painless-api-reference-String,String>> link:{java8-javadoc}/java/time/chrono/ChronoZonedDateTime.html#toString%2D%2D[toString]() (java 9)
-
[[painless-api-reference-ChronoZonedDateTime-with-1]]<<painless-api-reference-ChronoZonedDateTime,ChronoZonedDateTime>> link:{java8-javadoc}/java/time/chrono/ChronoZonedDateTime.html#with%2Djava.time.temporal.TemporalAdjuster%2D[with](<<painless-api-reference-TemporalAdjuster,TemporalAdjuster>>) (java 9)
-
[[painless-api-reference-ChronoZonedDateTime-with-2]]<<painless-api-reference-ChronoZonedDateTime,ChronoZonedDateTime>> link:{java8-javadoc}/java/time/chrono/ChronoZonedDateTime.html#with%2Djava.time.temporal.TemporalField%2Dlong%2D[with](<<painless-api-reference-TemporalField,TemporalField>>, long) (java 9)
-
[[painless-api-reference-ChronoZonedDateTime-withEarlierOffsetAtOverlap-0]]<<painless-api-reference-ChronoZonedDateTime,ChronoZonedDateTime>> link:{java8-javadoc}/java/time/chrono/ChronoZonedDateTime.html#withEarlierOffsetAtOverlap%2D%2D[withEarlierOffsetAtOverlap]() (java 9)
-
[[painless-api-reference-ChronoZonedDateTime-withLaterOffsetAtOverlap-0]]<<painless-api-reference-ChronoZonedDateTime,ChronoZonedDateTime>> link:{java8-javadoc}/java/time/chrono/ChronoZonedDateTime.html#withLaterOffsetAtOverlap%2D%2D[withLaterOffsetAtOverlap]() (java 9)
-
[[painless-api-reference-ChronoZonedDateTime-withZoneSameInstant-1]]<<painless-api-reference-ChronoZonedDateTime,ChronoZonedDateTime>> link:{java8-javadoc}/java/time/chrono/ChronoZonedDateTime.html#withZoneSameInstant%2Djava.time.ZoneId%2D[withZoneSameInstant](<<painless-api-reference-ZoneId,ZoneId>>) (java 9)
-
[[painless-api-reference-ChronoZonedDateTime-withZoneSameLocal-1]]<<painless-api-reference-ChronoZonedDateTime,ChronoZonedDateTime>> link:{java8-javadoc}/java/time/chrono/ChronoZonedDateTime.html#withZoneSameLocal%2Djava.time.ZoneId%2D[withZoneSameLocal](<<painless-api-reference-ZoneId,ZoneId>>) (java 9)
-
Inherits methods from <<painless-api-reference-Temporal,Temporal>>, <<painless-api-reference-TemporalAccessor,TemporalAccessor>>
-
- Chronology
-
-
[[painless-api-reference-Chronology-from-1]]static <<painless-api-reference-Chronology,Chronology>> link:{java8-javadoc}/java/time/chrono/Chronology.html#from%2Djava.time.temporal.TemporalAccessor%2D[from](<<painless-api-reference-TemporalAccessor,TemporalAccessor>>) (java 9)
-
[[painless-api-reference-Chronology-getAvailableChronologies-0]]static <<painless-api-reference-Set,Set>> link:{java8-javadoc}/java/time/chrono/Chronology.html#getAvailableChronologies%2D%2D[getAvailableChronologies]() (java 9)
-
[[painless-api-reference-Chronology-of-1]]static <<painless-api-reference-Chronology,Chronology>> link:{java8-javadoc}/java/time/chrono/Chronology.html#of%2Djava.lang.String%2D[of](<<painless-api-reference-String,String>>) (java 9)
-
[[painless-api-reference-Chronology-ofLocale-1]]static <<painless-api-reference-Chronology,Chronology>> link:{java8-javadoc}/java/time/chrono/Chronology.html#ofLocale%2Djava.util.Locale%2D[ofLocale](<<painless-api-reference-Locale,Locale>>) (java 9)
-
[[painless-api-reference-Chronology-compareTo-1]]int link:{java8-javadoc}/java/time/chrono/Chronology.html#compareTo%2Djava.time.chrono.Chronology%2D[compareTo](<<painless-api-reference-Chronology,Chronology>>) (java 9)
-
[[painless-api-reference-Chronology-date-1]]<<painless-api-reference-ChronoLocalDate,ChronoLocalDate>> link:{java8-javadoc}/java/time/chrono/Chronology.html#date%2Djava.time.temporal.TemporalAccessor%2D[date](<<painless-api-reference-TemporalAccessor,TemporalAccessor>>) (java 9)
-
[[painless-api-reference-Chronology-date-3]]<<painless-api-reference-ChronoLocalDate,ChronoLocalDate>> link:{java8-javadoc}/java/time/chrono/Chronology.html#date%2Dint%2Dint%2Dint%2D[date](int, int, int) (java 9)
-
[[painless-api-reference-Chronology-date-4]]<<painless-api-reference-ChronoLocalDate,ChronoLocalDate>> link:{java8-javadoc}/java/time/chrono/Chronology.html#date%2Djava.time.chrono.Era%2Dint%2Dint%2Dint%2D[date](<<painless-api-reference-Era,Era>>, int, int, int) (java 9)
-
[[painless-api-reference-Chronology-dateEpochDay-1]]<<painless-api-reference-ChronoLocalDate,ChronoLocalDate>> link:{java8-javadoc}/java/time/chrono/Chronology.html#dateEpochDay%2Dlong%2D[dateEpochDay](long) (java 9)
-
[[painless-api-reference-Chronology-dateYearDay-2]]<<painless-api-reference-ChronoLocalDate,ChronoLocalDate>> link:{java8-javadoc}/java/time/chrono/Chronology.html#dateYearDay%2Dint%2Dint%2D[dateYearDay](int, int) (java 9)
-
[[painless-api-reference-Chronology-dateYearDay-3]]<<painless-api-reference-ChronoLocalDate,ChronoLocalDate>> link:{java8-javadoc}/java/time/chrono/Chronology.html#dateYearDay%2Djava.time.chrono.Era%2Dint%2Dint%2D[dateYearDay](<<painless-api-reference-Era,Era>>, int, int) (java 9)
-
[[painless-api-reference-Chronology-equals-1]]boolean link:{java8-javadoc}/java/time/chrono/Chronology.html#equals%2Djava.lang.Object%2D[equals](<<painless-api-reference-Object,Object>>) (java 9)
-
[[painless-api-reference-Chronology-eraOf-1]]<<painless-api-reference-Era,Era>> link:{java8-javadoc}/java/time/chrono/Chronology.html#eraOf%2Dint%2D[eraOf](int) (java 9)
-
[[painless-api-reference-Chronology-eras-0]]<<painless-api-reference-List,List>> link:{java8-javadoc}/java/time/chrono/Chronology.html#eras%2D%2D[eras]() (java 9)
-
[[painless-api-reference-Chronology-getCalendarType-0]]<<painless-api-reference-String,String>> link:{java8-javadoc}/java/time/chrono/Chronology.html#getCalendarType%2D%2D[getCalendarType]() (java 9)
-
[[painless-api-reference-Chronology-getDisplayName-2]]<<painless-api-reference-String,String>> link:{java8-javadoc}/java/time/chrono/Chronology.html#getDisplayName%2Djava.time.format.TextStyle%2Djava.util.Locale%2D[getDisplayName](<<painless-api-reference-TextStyle,TextStyle>>, <<painless-api-reference-Locale,Locale>>) (java 9)
-
[[painless-api-reference-Chronology-getId-0]]<<painless-api-reference-String,String>> link:{java8-javadoc}/java/time/chrono/Chronology.html#getId%2D%2D[getId]() (java 9)
-
[[painless-api-reference-Chronology-hashCode-0]]int link:{java8-javadoc}/java/time/chrono/Chronology.html#hashCode%2D%2D[hashCode]() (java 9)
-
[[painless-api-reference-Chronology-isLeapYear-1]]boolean link:{java8-javadoc}/java/time/chrono/Chronology.html#isLeapYear%2Dlong%2D[isLeapYear](long) (java 9)
-
[[painless-api-reference-Chronology-localDateTime-1]]<<painless-api-reference-ChronoLocalDateTime,ChronoLocalDateTime>> link:{java8-javadoc}/java/time/chrono/Chronology.html#localDateTime%2Djava.time.temporal.TemporalAccessor%2D[localDateTime](<<painless-api-reference-TemporalAccessor,TemporalAccessor>>) (java 9)
-
[[painless-api-reference-Chronology-period-3]]<<painless-api-reference-ChronoPeriod,ChronoPeriod>> link:{java8-javadoc}/java/time/chrono/Chronology.html#period%2Dint%2Dint%2Dint%2D[period](int, int, int) (java 9)
-
[[painless-api-reference-Chronology-prolepticYear-2]]int link:{java8-javadoc}/java/time/chrono/Chronology.html#prolepticYear%2Djava.time.chrono.Era%2Dint%2D[prolepticYear](<<painless-api-reference-Era,Era>>, int) (java 9)
-
[[painless-api-reference-Chronology-range-1]]<<painless-api-reference-ValueRange,ValueRange>> link:{java8-javadoc}/java/time/chrono/Chronology.html#range%2Djava.time.temporal.ChronoField%2D[range](<<painless-api-reference-ChronoField,ChronoField>>) (java 9)
-
[[painless-api-reference-Chronology-resolveDate-2]]<<painless-api-reference-ChronoLocalDate,ChronoLocalDate>> link:{java8-javad
-