Looker functions and operators

Note: This page is part of theRetrieve and chart data learning series.

If your admin has granted you thepermissions to createtable calculations, you can use the following features to quickly perform common functions without needing to create Looker expressions:

  • Shortcut Calculations to quickly perform common calculations on numeric fields that are in an Explore's data table

If your admin has granted you thepermissions to createcustom fields, you can use the following features to quickly perform common functions without needing to create Looker expressions:

  • Custom groups to quickly group values under custom labels without needing to developCASE WHEN logic insql parameters ortype: case fields

  • Custom bins to group numeric type dimensions in custom tiers without needing to developtype: tier LookML fields

Looker expressions (sometimes referred to asLexp) are used to perform calculations for:

A major part of these expressions is the functions and operators that you can use in them. The functions and operators can be divided into a few basic categories:

Some functions are only available for table calculations

Looker expressions forcustom filters andcustom fields do not support Looker functions that convert datatypes, aggregate data from multiple rows, or refer to other rows or pivot columns. These functions are supportedonly fortable calculations (including table calculations used in theexpression parameter of adata test).

This page is organized to clarify which functions and operators are available, depending on where you are using your Looker expression.

Mathematical functions and operators

Mathematical functions and operators work in one of two ways:

  • Some mathematical functions perform calculations based on asingle row. For example, rounding, taking a square root, multiplying, and similar functions can be used for values in a single row, returning a distinct value for each and every row. All mathematical operators, such as+, are applied one row at a time.
  • Other mathematical functions, like averages and running totals, operate overmany rows. These functions take many rows and reduce them to a single number, then display that same number on every row.

Functions for any Looker expression

FunctionSyntaxPurpose
absabs(value)Returns the absolute value ofvalue.

For an example, see theStandard Deviation and Simple Time Series Outlier Detection Using Table Calculations Community post.
ceilingceiling(value)Returns the smallest integer greater than or equal tovalue.
expexp(value)Returnse to the power ofvalue.
floorfloor(value)Returns the largest integer less than or equal tovalue.
lnln(value)Returns the natural logarithm ofvalue.
loglog(value)Returns the base 10 logarithm ofvalue.
modmod(value, divisor)Returns the remainder of dividingvalue bydivisor.
powerpower(base, exponent)Returnsbase raised to the power ofexponent.

For an example, see theStandard Deviation and Simple Time Series Outlier Detection Using Table Calculations Community post.
randrand()Returns a random number between 0 and 1.
roundround(value, num_decimals)Returnsvalue rounded tonum_decimals decimal places.

For examples usinground, see theUsingpivot_index in table calculations andStandard Deviation and Simple Time Series Outlier Detection Using Table Calculations Community posts.
sqrtsqrt(value)Returns the square root ofvalue.

For an example, see theStandard Deviation and Simple Time Series Outlier Detection Using Table Calculations Community post.

Functions for table calculations only

Many of these functions operate over many rows and will only consider the rows returned by your query.

FunctionSyntaxPurpose
acosacos(value)Returns the inverse cosine ofvalue.
asinasin(value)Returns the inverse sine ofvalue.
atanatan(value)Returns the inverse tangent ofvalue.
beta_distbeta_dist(value, alpha, beta, cumulative)Returns the position ofvalue on the beta distribution with parametersalpha andbeta. Ifcumulative = yes, returns the cumulative probability.
beta_invbeta_inv(probability, alpha, beta)Returns the position ofprobability on the inverse cumulative beta distribution with parametersalpha andbeta.
binom_distbinom_dist(num_successes, num_tests, probability, cumulative)Returns the probability of gettingnum_successes successes innum_tests tests with the givenprobability of success. Ifcumulative = yes, returns the cumulative probability.
binom_invbinom_inv(num_tests, test_probability, target_probability)Returns the smallest numberk such thatbinom(k, num_tests, test_probability, yes) >= target_probability.
chisq_distchisq_dist(value, dof, cumulative)Returns the position ofvalue on the gamma distribution withdof degrees of freedom. Ifcumulative = yes, returns the cumulative probability.
chisq_invchisq_inv(probability, dof)Returns the position ofprobability on the inverse cumulative gamma distribution withdof degrees of freedom.
chisq_testchisq_test(actual, expected)Returns the probability for the chi-squared test for independence betweenactual andexpected data.actual can be a column or a column of lists, andexpected must be the same type.
combincombin(set_size, selection_size)Returns the number of ways of choosingselection_size elements from a set of sizeset_size.
confidence_normconfidence_norm(alpha, stdev, n)Returns half the width of the normal confidence interval at significance levelalpha, standard deviationstdev, and sample sizen.
confidence_tconfidence_t(alpha, stdev, n)Returns half the width of theStudent'st-distribution confidence interval at significance levelalpha, standard deviationstdev, and sample sizen.
correlcorrel(column_1, column_2)Returns the correlation coefficient ofcolumn_1 andcolumn_2.
coscos(value)Returns the cosine ofvalue.
countcount(expression)Returns the count of non-null values in the column defined byexpression, unlessexpression defines a column of lists, in which case returns the count in each list.
count_distinctcount_distinct(expression)Returns the count of distinct non-null values in the column defined byexpression, unlessexpression defines a column of lists, in which case returns the count in each list.
covar_popcovar_pop(column_1, column_2)Returns the population covariance ofcolumn_1 andcolumn_2.
covar_sampcovar_samp(column_1, column_2)Returns the sample covariance ofcolumn_1 andcolumn_2.
degreesdegrees(value)Convertsvalue from radians to degrees.
expon_distexpon_dist(value, lambda, cumulative)Returns the position ofvalue on the exponential distribution with parameterlambda. Ifcumulative = yes, returns the cumulative probability.
f_distf_dist(value, dof_1, dof_2, cumulative)Returns the position ofvalue on the F distribution with parametersdof_1 anddof_2. Ifcumulative = yes, returns the cumulative probability.
f_invf_inv(probability, dof_1, dof_2)Returns the position ofprobability on the inverse cumulative F distribution with parametersdof_1 anddof_2.
factfact(value)Returns the factorial ofvalue.
gamma_distgamma_dist(value, alpha, beta, cumulative)Returns the position ofvalue on the gamma distribution with parametersalpha andbeta. Ifcumulative = yes, returns the cumulative probability.
gamma_invgamma_inv(probability, alpha, beta)Returns the position ofprobability on the inverse cumulative gamma distribution with parametersalpha andbeta.
geomeangeomean(expression)Returns the geometric mean of the column created byexpression unlessexpression defines a column of lists, in which case returns the geometric mean of each list.
hypgeom_disthypgeom_dist(sample_successes, sample_size, population_successes, population_size, cumulative)Returns the probability of gettingsample_successes from the givensample_size, number ofpopulation_successes, andpopulation_size. Ifcumulative = yes, returns the cumulative probability.
interceptintercept(y_column, x_column)Returns the intercept of the linear regression line through the points determined byy_column andx_column.

For an example, see theHow to Forecast in Looker with Table Calculations Community post.
kurtosiskurtosis(expression)Returns the sample excess kurtosis of the column created byexpression unlessexpression defines a column of lists, in which case returns the sample excess kurtosis of each list.
largelarge(expression, k)Returns thekth largest value of the column created byexpression unlessexpression defines a column of lists, in which case returns thekth largest value of each list.
matchmatch(value, expression)Returns the row number of the first occurrence ofvalue in the column created byexpression unlessexpression defines a column of lists, in which case returns the position ofvalue in each list.
maxmax(expression)Returns the max of the column created byexpression unlessexpression defines a column of lists, in which case returns the max of each list.

For examples usingmax, see theUsing lists in table calculations andGrouping by a dimension in table calculations Community posts.
meanmean(expression)Returns the mean of the column created byexpression unlessexpression defines a column of lists, in which case returns the mean of each list.

For examples usingmean, see theCalculating Moving Averages Community post and theStandard Deviation and simple time series outlier detection using Table Calculations Community post.
medianmedian(expression)Returns the median of the column created byexpression unlessexpression defines a column of lists, in which case returns the median of each list.
minmin(expression)Returns the min of the column created byexpression unlessexpression defines a column of lists, in which case returns the min of each list.
modemode(expression)Returns the mode of the column created byexpression unlessexpression defines a column of lists, in which case returns the mode of each list.
multinomialmultinomial(value_1, value_2, ...)Returns the factorial of the sum of the arguments divided by the product of each of their factorials.
negbinom_distnegbinom_dist(num_failures, num_successes, probability, cumulative)Returns the probability of gettingnum_failures failures before gettingnum_successes successes, with the givenprobability of success. Ifcumulative = yes, returns the cumulative probability.
norm_distnorm_dist(value, mean, stdev, cumulative)Returns the position ofvalue on the normal distribution with the givenmean andstdev. Ifcumulative = yes, returns the cumulative probability.
norm_invnorm_inv(probability, mean, stdev)Returns the position ofprobability on the inverse normal cumulative distribution.
norm_s_distnorm_s_dist(value, cumulative)Returns the position ofvalue on the standard normal distribution. Ifcumulative = yes, returns the cumulative probability.
norm_s_invnorm_s_inv(probability)Returns the position ofprobability on the inverse standard normal cumulative distribution.
percent_rankpercent_rank(column, value)Returns the rank ofvalue incolumn as a percentage from 0 to 1 inclusive, wherecolumn is the column, field, list, or range containing the dataset to consider; andvalue is the column with the value for which the percentage rank will be determined.

Sample Usage:

percent_rank(${view_name.field_1}, ${view_name.field_1})

percent_rank(list(1, 2, 3), ${view_name.field_1})

percent_rank(list(1, 2, 3), 2)
percentilepercentile(expression, percentile_value)Returns the value from the column created byexpression corresponding to the givenpercentile_value, unlessexpression defines a column of lists, in which case returns the percentile value for each list.percentile_value must be between 0 and 1; otherwise returnsnull.
pipi()Returns the value of pi.
poisson_distpoisson_dist(value, lambda, cumulative)Returns the position ofvalue on the poisson distribution with parameterlambda. Ifcumulative = yes, returns the cumulative probability.
productproduct(expression)Returns the product of the column created byexpression unlessexpression defines a column of lists, in which case returns the product of each list.
radiansradians(value)Convertsvalue from degrees to radians.
rankrank(value, expression)Returns the rank ofvalue in the column created byexpression. For example, if you want to rank orders by their total sale price, you could userank(${order_items.total_sale_price},${order_items.total_sale_price}), which gives a rank for each value oforder_items.total_sale_price in your query when comparing it to the entire column oforder_items.total_sale_price in your query. In the case where theexpression defines multiple lists, this function returns the relative size of thevalue in each list.

For an example, see theRanks with Table Calculations Community post.
rank_avgrank_avg(value, expression)Returns the average rank ofvalue in the column created byexpression unlessexpression defines a column of lists, in which case returns the average rank ofvalue in each list.
running_productrunning_product(value_column)Returns a running product of the values invalue_column.
running_totalrunning_total(value_column)Returns a running total of the values invalue_column.

For an example, see theCreating a Running Total Down Columns with Table Calculations Best Practices page.
sinsin(value)Returns the sine ofvalue.
skewskew(expression)Returns the sample skewness of the column created byexpression unlessexpression defines a column of lists, in which case returns the sample skewness of each list.
slopeslope(y_column, x_column)Returns the slope of the linear regression line through points determined byy_column andx_column.

For an example, see theHow to Forecast in Looker with Table Calculations Community post.
smallsmall(expression, k)Returns thekth smallest value of the column created byexpression unlessexpression defines a column of lists, in which case returns thekth smallest value of each list.
stddev_popstddev_pop(expression)Returns the standard deviation (population) of the column created byexpression unlessexpression defines a column of lists, in which case returns the standard deviation (population) of each list.
stddev_sampstddev_samp(expression)Returns the standard deviation (sample) of the column created byexpression unlessexpression defines a column of lists, in which case returns the standard deviation (sample) of each list.
sumsum(expression)Returns the sum of the column created byexpression unlessexpression defines a column of lists, in which case returns the sum of each list.

For examples usingsum, see theAggregating Across Rows (Row Totals) in Table Calculations andHow to Calculate Percent-of-Total Best Practices pages.
t_distt_dist(value, dof, cumulative)Returns the position ofvalue on theStudent'st-distribution withdof degrees of freedom. Ifcumulative = yes, returns the cumulative probability.
t_invt_inv(probability, dof)Returns the position ofprobability on the inverse normal cumulative distribution withdof degrees of freedom.
t_testt_test(column_1, column_2, tails, type)Returns the result of aStudent'st-test on the data fromcolumn_1 andcolumn_2, using 1 or 2tails.type: 1 = paired, 2 = homoscedastic, 3 = heteroscedastic.
tantan(value)Returns the tangent ofvalue.
var_popvar_pop(expression)Returns the variance (population) of the column created byexpression unlessexpression defines a column of lists, in which case returns the variance (population) of each list.
var_sampvar_samp(expression)Returns the variance (sample) of the column created byexpression unlessexpression defines a column of lists, in which case returns the variance (sample) of each list.
weibull_distweibull_dist(value, shape, scale, cumulative)Returns the position ofvalue on the Weibull distribution with parametersshape andscale. Ifcumulative = yes, returns the cumulative probability.
z_testz_test(data, value, stdev)Returns the one-tailed p-value of the z-test using the existingdata andstdev on the hypothesized meanvalue.

Operators for any Looker expression

You can use the following standard mathematical operators:

OperatorSyntaxPurpose
+value_1 + value_2Addsvalue_1 andvalue_2.
-value_1 - value_2Subtractsvalue_2 fromvalue_1.
*value_1 * value_2Multipliesvalue_1 andvalue_2.
/value_1 / value_2Dividesvalue_1 byvalue_2.

String functions

String functions operate on sentences, words, or letters, which are collectively called "strings." You can use string functions to capitalize words and letters, extract parts of a phrase, check to see if a word or letter is in a phrase, or replace elements of a word or phrase. String functions can also be used to format the data returned in the table.

Functions for any Looker expression

FunctionSyntaxPurpose
concatconcat(value_1, value_2, ...)Returnsvalue_1,value_2,...,value_n joined as one string.
containscontains(string, search_string)ReturnsYes ifstring containssearch_string, andNo otherwise. Thecontains function is case-sensitive.
lengthlength(string)Returns the number of characters instring.
lowerlower(string)Returnsstring with all characters converted to lowercase.
positionposition(string, search_string)Returns the start index ofsearch_string instring if it exists, and0 otherwise.
replacereplace(string, old_string, new_string)Returnsstring with all occurrences ofold_string replaced withnew_string.
substringsubstring(string, start_position, length)Returns the substring ofstring, beginning atstart_position, consisting oflength characters. Thestart_position starts at1, with1 indicating the first character in the string,2 indicating the second character in the string, and so on.
upperupper(string)Returnsstring with all characters converted to uppercase.

Functions for table calculations only

FunctionSyntaxPurpose
splitsplit(string, delimeter)Returns a list of strings instring broken up bydelimiter.
to_numberto_number(string)Returns the number represented bystring, ornull if the string cannot be converted.
to_stringto_string(value)Returns the string representation ofvalue, or an empty string ifvalue is null.

Date functions

Date functions enable you to work with dates and times.

Functions for any Looker expression

FunctionSyntaxPurpose
add_daysadd_days(number, date)Addsnumber days todate.
add_hoursadd_hours(number, date)Addsnumber hours todate.
add_minutesadd_minutes(number, date)Addsnumber minutes todate.
add_monthsadd_months(number, date)Addsnumber months todate.
add_secondsadd_seconds(number, date)Addsnumber seconds todate.
add_yearsadd_years(number, date)Addsnumber years todate.
datedate(year, month, day)Returns "year-month-day" date ornull if the date would be invalid.
date_timedate_time(year, month, day, hours, minutes, seconds)Returnsyear-month-day hours:minutes:seconds date ornull if the date would be invalid.
diff_daysdiff_days(start_date, end_date)Returns the number of days betweenstart_date andend_date.

For an example, see theUsing dates in table calculations Community post.
diff_hoursdiff_hours(start_date, end_date)Returns the number of hours betweenstart_date andend_date.
diff_minutesdiff_minutes(start_date, end_date)Returns the number of minutes betweenstart_date andend_date.

For an example, see theUsing dates in table calculations Community post.
diff_monthsdiff_months(start_date, end_date)Returns the number of months betweenstart_date andend_date.

For an example, see theGrouping by a dimension in table calculations Community post.
diff_secondsdiff_seconds(start_date, end_date)Returns the number of seconds betweenstart_date andend_date.
diff_yearsdiff_years(start_date, end_date)Returns the number of years betweenstart_date andend_date.
extract_daysextract_days(date)Extracts the days fromdate.

For an example, see theUsing dates in table calculations Community post.
extract_hoursextract_hours(date)Extracts the hours fromdate.
extract_minutesextract_minutes(date)Extracts the minutes fromdate.
extract_monthsextract_months(date)Extracts the months fromdate.
extract_secondsextract_seconds(date)Extracts the seconds fromdate.
extract_yearsextract_years(date)Extracts the years fromdate.
nownow()Returns the current date and time.

For examples usingnow, see theNow() Table Calculation Function Has Better Timezone Handling Community post and theUsing dates in table calculations Community post.
trunc_daystrunc_days(date)Truncatesdate to days.
trunc_hourstrunc_hours(date)Truncatesdate to hours.
trunc_minutestrunc_minutes(date)Truncatesdate to minutes.
trunc_monthstrunc_months(date)Truncatesdate to months.
trunc_yearstrunc_years(date)Truncatesdate to years.

Functions for table calculations only

FunctionSyntaxPurpose
to_dateto_date(string)Returns the date and time corresponding tostring (YYYY, YYYY-MM, YYYY-MM-DD, YYYY-MM-DD hh, YYYY-MM-DD hh:mm, or YYYY-MM-DD hh:mm:ss).

Logical functions, operators, and constants

Logical functions and operators are used to assess whether something is true or false. Expressions using these elements take a value, evaluate it against some criteria, returnYes if the criteria are met, andNo if the criteria are not met. There are also various logical operators for comparing values and combining logical expressions.

Functions for any Looker expression

FunctionSyntaxPurpose
casecase(when(yesno_arg, value_if_yes), when(yesno_arg, value_if_yes), ..., else_value) Added 21.10 Allows conditional logic with multiple conditions and outcomes. Returnsvalue_if_yes for the firstwhen case whoseyesno_arg value isyes. Returnselse_value if allwhen cases areno.
coalescecoalesce(value_1, value_2, ...)Returns the first non-null value invalue_1,value_2,...,value_n if found andnull otherwise.

For examples usingcoalesce, see the following Community posts:Creating a running total across rows with table calculations,Creating a percent of total across rows with table calculations, andUsing pivot_index in table calculations.
ifif(yesno_expression, value_if_yes, value_if_no)Ifyesno_expression evaluates toYes, returns thevalue_if_yes value. Otherwise, returns thevalue_if_no value.

For an example, see theGrouping by a dimension in table calculations Community post.
is_nullis_null(value)ReturnsYes ifvalue isnull, andNo otherwise.

For an example, see theCreating Looker expressions documentation page. For another example that usesis_null with theNOT operator, see theUsing table calculations documentation page.

Operators for any Looker expression

The following comparison operators can be used with any data type:

OperatorSyntaxPurpose
=value_1 = value_2ReturnsYes ifvalue_1 is equal tovalue_2, andNo otherwise.
!=value_1 != value_2ReturnsYes ifvalue_1 is not equal tovalue_2, andNo otherwise.

The following comparison operators can be used with numbers, dates, and strings:

OperatorSyntaxPurpose
>value_1 > value_2ReturnsYes ifvalue_1 is greater thanvalue_2, andNo otherwise.
<value_1 < value_2ReturnsYes ifvalue_1 is less thanvalue_2, andNo otherwise.
>=value_1 >= value_2ReturnsYes ifvalue_1 is greater than or equal tovalue_2, andNo otherwise.
<=value_1 <= value_2ReturnsYes ifvalue_1 is less than or equal tovalue_2, andNo otherwise.

You also can combine Looker expressions with these logical operators:

OperatorSyntaxPurpose
ANDvalue_1 AND value_2ReturnsYes if bothvalue_1 andvalue_2 areYes, andNo otherwise.
ORvalue_1 OR value_2ReturnsYes if eithervalue_1 orvalue_2 isYes, andNo otherwise.
NOTNOT valueReturnsYes ifvalue isNo, andNo otherwise.

These logical operators must be capitalized. Logical operators written in lowercase will not work.

Logical constants

You can use logical constants in Looker expressions. These constants are always written in lowercase and have the following meanings:

ConstantMeaning
yesTrue
noFalse
nullNo value

Note that the constantsyes andno are the special symbols that ​mean true or false in Looker expressions. In contrast, using quotes such as in"yes" and"no" creates literal strings with those values.

Logical expressions evaluate to true or false without requiring anif function. For example, this:

if(${field} > 100, yes, no)

is equivalent to this:

${field} > 100

You also can usenull to indicate no value. For example, you may want to determine if a field is empty, or assign an empty value in a certain situation. This formula returns no value if the field is less than 1, or the value of the field if it is more than 1:

if(${field} < 1, null, ${field})

CombiningAND andOR operators

AND operators are evaluated beforeOR operators, if you don't otherwise specify the order with parentheses. Thus, the following expression without additional parentheses:

if(${order_items.days_to_process}>=4OR${order_items.shipping_time}>5AND${order_facts.is_first_purchase},"review","okay")

would be evaluated as:

if(${order_items.days_to_process}>=4OR(${order_items.shipping_time}>5AND${order_facts.is_first_purchase}),"review","okay")

Positional functions

When creating table calculations, you can use positional transformation functions to extract information about fields in different rows or pivot columns. You can also create lists and retrieve the current row or pivot column index.

Column and row totals for table calculations only

If yourExplore contains totals, you can reference total values for columns and rows:

FunctionSyntaxPurpose
:total${field:total}Returns the column total of the field.
:row_total${field:row_total}Returns the row total of the field.

Row-related functions for table calculations only

Some of these functions use the relative positions of rows, so changing the sort order of the rows affects the results of the functions.

FunctionSyntaxPurpose
indexindex(expression, n)Returns the value of thenth element of the column created byexpression, unlessexpression defines a column of lists, in which case returns thenth element of each list.
listlist(value_1, value_2, ...)Creates a list out of the given values.

For an example, see theUsing lists in table calculations Community post.
lookuplookup(value, lookup_column, result_column)Returns the value inresult_column that is in the same row asvalue is inlookup_column.
offsetoffset(column, row_offset)Returns the value of row(n + row_offset) incolumn, wheren is the current row number.

For examples usingoffset, see theCalculating Percent of Previous and Percent Change with Table Calculations Best Practices page.
offset_listoffset_list(column, row_offset, num_values)Returns a list of thenum_values values starting at row(n + row_offset) incolumn, wheren is the current row number.

For an example, see theCalculating Moving Averages Community post.
rowrow()Returns the current row number.

Pivot-related functions for table calculations only

Some of these functions use the relative positions of pivot columns, so changing the sort order of the pivoted dimension affects the results of those functions.

FunctionSyntaxPurpose
pivot_columnpivot_column()Returns the index of the current pivot column.
pivot_indexpivot_index(expression, pivot_index)Evaluatesexpression in the context of the pivot column at positionpivot_index (1 for first pivot, 2 second pivot, etc.). Returns null for unpivoted results.

For examples usingpivot_index, see theUsing pivot_index in table calculations andCreating a percent of total across rows with table calculations Community posts.
pivot_offsetpivot_offset(pivot_expression, col_offset)Returns the value of thepivot_expression in position(n + col_offset), wheren is the current pivot column position. Returns null for unpivoted results.

For examples usingpivot_offset, see theCreating a running total across rows with table calculations Community post and theCalculating Percent of Previous and Percent Change with Table Calculations Best Practices page.
pivot_offset_listpivot_offset_list(pivot_expression, col_offset, num_values)Returns a list of thenum_values values inpivot_expression starting at position(n + col_offset), wheren is the current pivot index. Returnsnull for unpivoted results.
pivot_rowpivot_row(expression)Returns the pivoted values ofexpression as a list. Returnsnull for unpivoted results.

For examples usingpivot_row, see theAggregating Across Rows (Row Totals) in Table Calculations andHow to Calculate Percent-of-Total Best Practices pages.
pivot_wherepivot_where(select_expression, expression)Returns the value ofexpression for the pivot column that uniquely satisfiesselect_expression ornull if such a unique column does not exist.

The specific pivot functions you use determine whether the table calculation is displayed next to each pivoted column, or is displayed as a single column at the end of the table.

Filter functions for custom filters and custom fields

Filter functions let you work withfilter expressions to return values based on filtered data. Filter functions work incustom filters,filters on custom measures, andcustom dimensions, but are not valid in table calculations.

FunctionSyntaxPurpose
matches_filtermatches_filter(field, filter_expression)ReturnsYes if the value of the field matches the filter expression,No if not.

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

Last updated 2026-02-19 UTC.