blob: 6badda98befd1958f7b2a18be71b85ad66b07d40 [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) -->
<title>Matchers (Apache Calcite API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="declaration: package: org.apache.calcite.test, class: Matchers">
<meta name="generator" content="javadoc/ClassWriterImpl">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../script-dir/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../jquery-ui.overrides.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
<script type="text/javascript" src="../../../../script-dir/jquery-3.5.1.min.js"></script>
<script type="text/javascript" src="../../../../script-dir/jquery-ui.min.js"></script>
</head>
<body class="class-declaration-page">
<script type="text/javascript">var evenRowColor = "even-row-color";
var oddRowColor = "odd-row-color";
var tableTab = "table-tab";
var activeTableTab = "active-table-tab";
var pathtoroot = "../../../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top">
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<div class="about-language"><b>Apache Calcite</b></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="nav-bar-cell1-rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html#class">Help</a></li>
</ul>
</div>
<div class="sub-nav">
<div>
<ul class="sub-nav-list">
<li>Summary:&nbsp;</li>
<li><a href="#nested-class-summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field-summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method-summary">Method</a></li>
</ul>
<ul class="sub-nav-list">
<li>Detail:&nbsp;</li>
<li><a href="#field-detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method-detail">Method</a></li>
</ul>
</div>
<div class="nav-list-search"><label for="search-input">SEARCH:</label>
<input type="text" id="search-input" value="search" disabled="disabled">
<input type="reset" id="reset-button" value="reset" disabled="disabled">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">org.apache.calcite.test</a></div>
<h1 title="Class Matchers" class="title">Class Matchers</h1>
</div>
<div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">java.lang.Object</a>
<div class="inheritance">org.apache.calcite.test.Matchers</div>
</div>
<section class="class-description" id="class-description">
<hr>
<div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">Matchers</span>
<span class="extends-implements">extends <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span></div>
<div class="block">Matchers for testing SQL queries.</div>
</section>
<section class="summary">
<ul class="summary-list">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<li>
<section class="nested-class-summary" id="nested-class-summary">
<h2>Nested Class Summary</h2>
<div class="caption"><span>Nested Classes</span></div>
<div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Class</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><code>static class&nbsp;</code></div>
<div class="col-second even-row-color"><code><a href="Matchers.IsWithin.html" class="type-name-link" title="class in org.apache.calcite.test">Matchers.IsWithin</a>&lt;<a href="Matchers.IsWithin.html" title="type parameter in Matchers.IsWithin">T</a> extends <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Number.html" title="class or interface in java.lang" class="external-link">Number</a>&gt;</code></div>
<div class="col-last even-row-color">
<div class="block">Matcher that tests whether the numeric value is within a given difference
another value.</div>
</div>
</div>
</section>
</li>
<!-- =========== FIELD SUMMARY =========== -->
<li>
<section class="field-summary" id="field-summary">
<h2>Field Summary</h2>
<div class="caption"><span>Fields</span></div>
<div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Field</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><code>static final double</code></div>
<div class="col-second even-row-color"><code><a href="#EPSILON" class="member-name-link">EPSILON</a></code></div>
<div class="col-last even-row-color">
<div class="block">A small positive value.</div>
</div>
</div>
</section>
</li>
<!-- ========== METHOD SUMMARY =========== -->
<li>
<section class="method-summary" id="method-summary">
<h2>Method Summary</h2>
<div id="method-summary-table">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab1" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab1', 3)" class="table-tab">Static Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel">
<div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static &lt;T extends <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Comparable.html" title="class or interface in java.lang" class="external-link">Comparable</a>&lt;T&gt;&gt;<br>org.hamcrest.Matcher&lt;T&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#between(T,T)" class="member-name-link">between</a><wbr>(T&nbsp;min,
T&nbsp;max)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Creates a matcher that matches if the examined value is between bounds:
<code>min &le; value &le; max</code>.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static &lt;F,<wbr>
T&gt;&nbsp;org.hamcrest.Matcher&lt;F&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#compose(org.hamcrest.Matcher,java.util.function.Function)" class="member-name-link">compose</a><wbr>(org.hamcrest.Matcher&lt;T&gt;&nbsp;matcher,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/function/Function.html" title="class or interface in java.util.function" class="external-link">Function</a>&lt;F,<wbr>T&gt;&nbsp;f)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Creates a matcher by applying a function to a value before calling
another matcher.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static org.hamcrest.Matcher&lt;<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#containsStringLinux(java.lang.String)" class="member-name-link">containsStringLinux</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;value)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Creates a matcher that matches when the examined string is equal to the
specified <code>operand</code> when all Windows-style line endings ("\r\n")
have been converted to Unix-style line endings ("\n").</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static org.hamcrest.Matcher&lt;<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#containsWithoutNodeIds(java.lang.String)" class="member-name-link">containsWithoutNodeIds</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;value)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Creates a <code>Matcher</code> that matches execution plan and trims <code>, id=123</code> node ids.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static &lt;E extends <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Comparable.html" title="class or interface in java.lang" class="external-link">Comparable</a>&gt;<br>org.hamcrest.Matcher&lt;<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Iterable.html" title="class or interface in java.lang" class="external-link">Iterable</a>&lt;E&gt;&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#equalsUnordered(E...)" class="member-name-link">equalsUnordered</a><wbr>(E...&nbsp;lines)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">&nbsp;</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static org.hamcrest.Matcher&lt;? super <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Throwable.html" title="class or interface in java.lang" class="external-link">Throwable</a>&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#expectThrowable(java.lang.Throwable)" class="member-name-link">expectThrowable</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Throwable.html" title="class or interface in java.lang" class="external-link">Throwable</a>&nbsp;expected)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Creates a matcher that matches if the examined value is expected throwable.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static org.hamcrest.Matcher&lt;<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#hasFieldNames(java.lang.String)" class="member-name-link">hasFieldNames</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;fieldNames)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Creates a Matcher that matches a <a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel"><code>RelNode</code></a> if its field
names, converting to a list, are equal to the given <code>value</code>.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static org.hamcrest.Matcher&lt;<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#hasHints(java.lang.String)" class="member-name-link">hasHints</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;value)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Creates a Matcher that matches a <a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel"><code>RelNode</code></a> if its hints string
representation is equal to the given <code>value</code>.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static org.hamcrest.Matcher&lt;<a href="../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#hasRex(java.lang.String)" class="member-name-link">hasRex</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;value)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Creates a Matcher that matches a <a href="../rex/RexNode.html" title="class in org.apache.calcite.rex"><code>RexNode</code></a> if its string
representation, after converting Windows-style line endings ("\r\n")
to Unix-style line endings ("\n"), is equal to the given <code>value</code>.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static org.hamcrest.Matcher&lt;<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#hasTree(java.lang.String)" class="member-name-link">hasTree</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;value)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Creates a Matcher that matches a <a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel"><code>RelNode</code></a> if its string
representation, after converting Windows-style line endings ("\r\n")
to Unix-style line endings ("\n"), is equal to the given <code>value</code>.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static org.hamcrest.Matcher&lt;<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#inTree(java.lang.String)" class="member-name-link">inTree</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;value)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Creates a Matcher that matches a <a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel"><code>RelNode</code></a> if its string
representation, after converting Windows-style line endings ("\r\n")
to Unix-style line endings ("\n"), contains the given <code>value</code>
as a substring.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static org.hamcrest.Matcher&lt;<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Double.html" title="class or interface in java.lang" class="external-link">Double</a>&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#isAlmost(double)" class="member-name-link">isAlmost</a><wbr>(double&nbsp;value)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Creates a matcher that matches when the examined object is within
<a href="#EPSILON"><code>EPSILON</code></a> of the specified <code>operand</code>.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static org.hamcrest.Matcher&lt;<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/charset/Charset.html" title="class or interface in java.nio.charset" class="external-link">Charset</a>&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#isCharset(java.lang.String)" class="member-name-link">isCharset</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;charsetName)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Creates a matcher that matches if the examined value has a given name.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static org.hamcrest.Matcher&lt;<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#isLinux(java.lang.String)" class="member-name-link">isLinux</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;value)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Creates a Matcher that matches when the examined string is equal to the
specified <code>value</code> when all Windows-style line endings ("\r\n")
have been converted to Unix-style line endings ("\n").</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static org.hamcrest.Matcher&lt;com.google.common.collect.RangeSet&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#isRangeSet(java.lang.String)" class="member-name-link">isRangeSet</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;value)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Creates a Matcher that matches a <code>RangeSet</code> if its string
representation, after changing "&#2025;" to "..",
is equal to the given <code>value</code>.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static org.hamcrest.Matcher&lt;<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#relIsValid()" class="member-name-link">relIsValid</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Matcher that matches a <a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel"><code>RelNode</code></a> if the <code>RelNode</code> is valid
per <a href="../rel/RelValidityChecker.html" title="class in org.apache.calcite.rel"><code>RelValidityChecker</code></a>.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static org.hamcrest.Matcher&lt;? super <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.sql/java/sql/ResultSet.html" title="class or interface in java.sql" class="external-link">ResultSet</a>&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#returnsUnordered(java.lang.String...)" class="member-name-link">returnsUnordered</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>...&nbsp;lines)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Creates a matcher that matches if the examined result set returns the
given collection of rows in some order.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static &lt;T&gt;&nbsp;org.hamcrest.Matcher&lt;<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Iterable.html" title="class or interface in java.lang" class="external-link">Iterable</a>&lt;T&gt;&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#sortsAs(java.lang.String)" class="member-name-link">sortsAs</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;value)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Matcher that succeeds for any collection that, when converted to strings
and sorted on those strings, matches the given reference string.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#trimNodeIds(java.lang.String)" class="member-name-link">trimNodeIds</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;s)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">&nbsp;</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static &lt;T extends <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Number.html" title="class or interface in java.lang" class="external-link">Number</a>&gt;<br>org.hamcrest.Matcher&lt;T&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#within(T,double)" class="member-name-link">within</a><wbr>(T&nbsp;value,
double&nbsp;epsilon)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Creates a matcher that matches when the examined object is within
<code>epsilon</code> of the specified <code>value</code>.</div>
</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-java.lang.Object">Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3>
<code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link">hashCode</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#toString()" title="class or interface in java.lang" class="external-link">toString</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ============ FIELD DETAIL =========== -->
<li>
<section class="field-details" id="field-detail">
<h2>Field Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="EPSILON">
<h3>EPSILON</h3>
<div class="member-signature"><span class="modifiers">public static final</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">EPSILON</span></div>
<div class="block">A small positive value.</div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="../../../../constant-values.html#org.apache.calcite.test.Matchers.EPSILON">Constant Field Values</a></li>
</ul>
</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="returnsUnordered(java.lang.String...)">
<h3>returnsUnordered</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">org.hamcrest.Matcher&lt;? super <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.sql/java/sql/ResultSet.html" title="class or interface in java.sql" class="external-link">ResultSet</a>&gt;</span>&nbsp;<span class="element-name">returnsUnordered</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>...&nbsp;lines)</span></div>
<div class="block">Creates a matcher that matches if the examined result set returns the
given collection of rows in some order.
<p>Closes the result set after reading.
<p>For example:
<pre>assertThat(statement.executeQuery("select empno from emp"),
returnsUnordered("empno=1234", "empno=100"));</pre></div>
</section>
</li>
<li>
<section class="detail" id="equalsUnordered(E...)">
<h3 id="equalsUnordered(java.lang.Comparable[])">equalsUnordered</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="type-parameters">&lt;E extends <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Comparable.html" title="class or interface in java.lang" class="external-link">Comparable</a>&gt;</span>
<span class="return-type">org.hamcrest.Matcher&lt;<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Iterable.html" title="class or interface in java.lang" class="external-link">Iterable</a>&lt;E&gt;&gt;</span>&nbsp;<span class="element-name">equalsUnordered</span><wbr><span class="parameters">(E...&nbsp;lines)</span></div>
</section>
</li>
<li>
<section class="detail" id="within(T,double)">
<h3 id="within(java.lang.Number,double)">within</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="type-parameters">&lt;T extends <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Number.html" title="class or interface in java.lang" class="external-link">Number</a>&gt;</span>
<span class="return-type">org.hamcrest.Matcher&lt;T&gt;</span>&nbsp;<span class="element-name">within</span><wbr><span class="parameters">(T&nbsp;value,
double&nbsp;epsilon)</span></div>
<div class="block">Creates a matcher that matches when the examined object is within
<code>epsilon</code> of the specified <code>value</code>.</div>
</section>
</li>
<li>
<section class="detail" id="isAlmost(double)">
<h3>isAlmost</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">org.hamcrest.Matcher&lt;<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Double.html" title="class or interface in java.lang" class="external-link">Double</a>&gt;</span>&nbsp;<span class="element-name">isAlmost</span><wbr><span class="parameters">(double&nbsp;value)</span></div>
<div class="block">Creates a matcher that matches when the examined object is within
<a href="#EPSILON"><code>EPSILON</code></a> of the specified <code>operand</code>.</div>
</section>
</li>
<li>
<section class="detail" id="between(T,T)">
<h3 id="between(java.lang.Comparable,java.lang.Comparable)">between</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="type-parameters">&lt;T extends <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Comparable.html" title="class or interface in java.lang" class="external-link">Comparable</a>&lt;T&gt;&gt;</span>
<span class="return-type">org.hamcrest.Matcher&lt;T&gt;</span>&nbsp;<span class="element-name">between</span><wbr><span class="parameters">(T&nbsp;min,
T&nbsp;max)</span></div>
<div class="block">Creates a matcher that matches if the examined value is between bounds:
<code>min &le; value &le; max</code>.</div>
<dl class="notes">
<dt>Type Parameters:</dt>
<dd><code>T</code> - value type</dd>
<dt>Parameters:</dt>
<dd><code>min</code> - Lower bound</dd>
<dd><code>max</code> - Upper bound</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="compose(org.hamcrest.Matcher,java.util.function.Function)">
<h3>compose</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="type-parameters">&lt;F,<wbr>
T&gt;</span>&nbsp;<span class="return-type">org.hamcrest.Matcher&lt;F&gt;</span>&nbsp;<span class="element-name">compose</span><wbr><span class="parameters">(org.hamcrest.Matcher&lt;T&gt;&nbsp;matcher,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/function/Function.html" title="class or interface in java.util.function" class="external-link">Function</a>&lt;F,<wbr>T&gt;&nbsp;f)</span></div>
<div class="block">Creates a matcher by applying a function to a value before calling
another matcher.</div>
</section>
</li>
<li>
<section class="detail" id="isLinux(java.lang.String)">
<h3>isLinux</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">org.hamcrest.Matcher&lt;<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&gt;</span>&nbsp;<span class="element-name">isLinux</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;value)</span></div>
<div class="block">Creates a Matcher that matches when the examined string is equal to the
specified <code>value</code> when all Windows-style line endings ("\r\n")
have been converted to Unix-style line endings ("\n").
<p>Thus, if <code>foo()</code> is a function that returns "hello{newline}world"
in the current operating system's line endings, then
<blockquote>
assertThat(foo(), isLinux("hello\nworld"));
</blockquote>
<p>will succeed on all platforms.</div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="../util/Util.html#toLinux(java.lang.String)"><code>Util.toLinux(String)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="relIsValid()">
<h3>relIsValid</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">org.hamcrest.Matcher&lt;<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&gt;</span>&nbsp;<span class="element-name">relIsValid</span>()</div>
<div class="block">Matcher that matches a <a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel"><code>RelNode</code></a> if the <code>RelNode</code> is valid
per <a href="../rel/RelValidityChecker.html" title="class in org.apache.calcite.rel"><code>RelValidityChecker</code></a>.</div>
</section>
</li>
<li>
<section class="detail" id="hasTree(java.lang.String)">
<h3>hasTree</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">org.hamcrest.Matcher&lt;<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&gt;</span>&nbsp;<span class="element-name">hasTree</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;value)</span></div>
<div class="block">Creates a Matcher that matches a <a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel"><code>RelNode</code></a> if its string
representation, after converting Windows-style line endings ("\r\n")
to Unix-style line endings ("\n"), is equal to the given <code>value</code>.</div>
</section>
</li>
<li>
<section class="detail" id="hasFieldNames(java.lang.String)">
<h3>hasFieldNames</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">org.hamcrest.Matcher&lt;<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&gt;</span>&nbsp;<span class="element-name">hasFieldNames</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;fieldNames)</span></div>
<div class="block">Creates a Matcher that matches a <a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel"><code>RelNode</code></a> if its field
names, converting to a list, are equal to the given <code>value</code>.</div>
</section>
</li>
<li>
<section class="detail" id="inTree(java.lang.String)">
<h3>inTree</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">org.hamcrest.Matcher&lt;<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&gt;</span>&nbsp;<span class="element-name">inTree</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;value)</span></div>
<div class="block">Creates a Matcher that matches a <a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel"><code>RelNode</code></a> if its string
representation, after converting Windows-style line endings ("\r\n")
to Unix-style line endings ("\n"), contains the given <code>value</code>
as a substring.</div>
</section>
</li>
<li>
<section class="detail" id="hasRex(java.lang.String)">
<h3>hasRex</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">org.hamcrest.Matcher&lt;<a href="../rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>&gt;</span>&nbsp;<span class="element-name">hasRex</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;value)</span></div>
<div class="block">Creates a Matcher that matches a <a href="../rex/RexNode.html" title="class in org.apache.calcite.rex"><code>RexNode</code></a> if its string
representation, after converting Windows-style line endings ("\r\n")
to Unix-style line endings ("\n"), is equal to the given <code>value</code>.</div>
</section>
</li>
<li>
<section class="detail" id="hasHints(java.lang.String)">
<h3>hasHints</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">org.hamcrest.Matcher&lt;<a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a>&gt;</span>&nbsp;<span class="element-name">hasHints</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;value)</span></div>
<div class="block">Creates a Matcher that matches a <a href="../rel/RelNode.html" title="interface in org.apache.calcite.rel"><code>RelNode</code></a> if its hints string
representation is equal to the given <code>value</code>.</div>
</section>
</li>
<li>
<section class="detail" id="isRangeSet(java.lang.String)">
<h3>isRangeSet</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">org.hamcrest.Matcher&lt;com.google.common.collect.RangeSet&gt;</span>&nbsp;<span class="element-name">isRangeSet</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;value)</span></div>
<div class="block">Creates a Matcher that matches a <code>RangeSet</code> if its string
representation, after changing "&#2025;" to "..",
is equal to the given <code>value</code>.
<p>This method is necessary because <code>RangeSet.toString()</code> changed
behavior. Guava 19 - 28 used a unicode symbol; Guava 29 onwards uses "..".</div>
</section>
</li>
<li>
<section class="detail" id="containsWithoutNodeIds(java.lang.String)">
<h3>containsWithoutNodeIds</h3>
<div class="member-signature"><span class="annotations">@API(since="1.22",
status=EXPERIMENTAL)
</span><span class="modifiers">public static</span>&nbsp;<span class="return-type">org.hamcrest.Matcher&lt;<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&gt;</span>&nbsp;<span class="element-name">containsWithoutNodeIds</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;value)</span></div>
<div class="block">Creates a <code>Matcher</code> that matches execution plan and trims <code>, id=123</code> node ids.
<a href="../plan/RelOptNode.html#getId()"><code>RelOptNode.getId()</code></a> is not stable across runs, so this matcher enables to trim those.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>value</code> - execpted execution plan</dd>
<dt>Returns:</dt>
<dd>matcher</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="containsStringLinux(java.lang.String)">
<h3>containsStringLinux</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">org.hamcrest.Matcher&lt;<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&gt;</span>&nbsp;<span class="element-name">containsStringLinux</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;value)</span></div>
<div class="block">Creates a matcher that matches when the examined string is equal to the
specified <code>operand</code> when all Windows-style line endings ("\r\n")
have been converted to Unix-style line endings ("\n").
<p>Thus, if <code>foo()</code> is a function that returns "hello{newline}world"
in the current operating system's line endings, then
<blockquote>
assertThat(foo(), isLinux("hello\nworld"));
</blockquote>
<p>will succeed on all platforms.</div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="../util/Util.html#toLinux(java.lang.String)"><code>Util.toLinux(String)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="trimNodeIds(java.lang.String)">
<h3>trimNodeIds</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name">trimNodeIds</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;s)</span></div>
</section>
</li>
<li>
<section class="detail" id="expectThrowable(java.lang.Throwable)">
<h3>expectThrowable</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">org.hamcrest.Matcher&lt;? super <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Throwable.html" title="class or interface in java.lang" class="external-link">Throwable</a>&gt;</span>&nbsp;<span class="element-name">expectThrowable</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Throwable.html" title="class or interface in java.lang" class="external-link">Throwable</a>&nbsp;expected)</span></div>
<div class="block">Creates a matcher that matches if the examined value is expected throwable.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>expected</code> - Throwable to match.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="isCharset(java.lang.String)">
<h3>isCharset</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">org.hamcrest.Matcher&lt;<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/charset/Charset.html" title="class or interface in java.nio.charset" class="external-link">Charset</a>&gt;</span>&nbsp;<span class="element-name">isCharset</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;charsetName)</span></div>
<div class="block">Creates a matcher that matches if the examined value has a given name.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>charsetName</code> - Name of character set</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list-long">
<li><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/charset/Charset.html#forName(java.lang.String)" title="class or interface in java.nio.charset" class="external-link"><code>Charset.forName(java.lang.String)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="sortsAs(java.lang.String)">
<h3>sortsAs</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="type-parameters">&lt;T&gt;</span>&nbsp;<span class="return-type">org.hamcrest.Matcher&lt;<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Iterable.html" title="class or interface in java.lang" class="external-link">Iterable</a>&lt;T&gt;&gt;</span>&nbsp;<span class="element-name">sortsAs</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;value)</span></div>
<div class="block">Matcher that succeeds for any collection that, when converted to strings
and sorted on those strings, matches the given reference string.
<p>Use it as an alternative to <code>CoreMatchers.is(org.hamcrest.Matcher&lt;T&gt;)</code> if items in your
list might occur in any order.
<p>For example:
<pre><code>
List&lt;Integer&gt; ints = Arrays.asList(2, 500, 12);
assertThat(ints, sortsAs("[12, 2, 500]");
</code></pre></div>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
<footer role="contentinfo">
<hr>
<p class="legal-copy"><small>Copyright &copy; 2012-2023 Apache Software Foundation. All Rights Reserved.</small></p>
</footer>
</div>
</div>
</body>
</html>