blob: 31dae108377a424096f509b6088c68ea51ecc612 [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>Mapping (Apache Calcite calcite API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="declaration: package: org.apache.calcite.util.mapping, interface: Mapping">
<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.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../script-dir/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../../script-dir/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../../script-dir/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../../script-dir/jquery-3.4.1.js"></script>
<script type="text/javascript" src="../../../../../script-dir/jquery-ui.js"></script>
</head>
<body class="class-declaration">
<script type="text/javascript">var data = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flexBox">
<header role="banner" class="flexHeader">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">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">Help</a></li>
</ul>
<div class="aboutLanguage"><b>Apache Calcite</b></div>
</div>
<div class="subNav">
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<div class="navListSearch"><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="skipNav"><a id="skip.navbar.top">
<!-- -->
</a></div>
</nav>
</header>
<div class="flexContent">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">org.apache.calcite.util.mapping</a></div>
<h1 title="Interface Mapping" class="title">Interface Mapping</h1>
</div>
<div class="contentContainer">
<section class="description">
<dl>
<dt>All Superinterfaces:</dt>
<dd><code><a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Iterable</a>&lt;<a href="IntPair.html" title="class in org.apache.calcite.util.mapping">IntPair</a>&gt;</code>, <code><a href="Mappings.CoreMapping.html" title="interface in org.apache.calcite.util.mapping">Mappings.CoreMapping</a></code>, <code><a href="Mappings.FunctionMapping.html" title="interface in org.apache.calcite.util.mapping">Mappings.FunctionMapping</a></code>, <code><a href="Mappings.SourceMapping.html" title="interface in org.apache.calcite.util.mapping">Mappings.SourceMapping</a></code>, <code><a href="Mappings.TargetMapping.html" title="interface in org.apache.calcite.util.mapping">Mappings.TargetMapping</a></code></dd>
</dl>
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><code><a href="AbstractSourceMapping.html" title="class in org.apache.calcite.util.mapping">AbstractSourceMapping</a></code>, <code><a href="AbstractTargetMapping.html" title="class in org.apache.calcite.util.mapping">AbstractTargetMapping</a></code>, <code><a href="Mappings.AbstractMapping.html" title="class in org.apache.calcite.util.mapping">Mappings.AbstractMapping</a></code>, <code><a href="Mappings.FiniteAbstractMapping.html" title="class in org.apache.calcite.util.mapping">Mappings.FiniteAbstractMapping</a></code>, <code><a href="Mappings.IdentityMapping.html" title="class in org.apache.calcite.util.mapping">Mappings.IdentityMapping</a></code>, <code><a href="Mappings.OverridingSourceMapping.html" title="class in org.apache.calcite.util.mapping">Mappings.OverridingSourceMapping</a></code>, <code><a href="Mappings.OverridingTargetMapping.html" title="class in org.apache.calcite.util.mapping">Mappings.OverridingTargetMapping</a></code>, <code><a href="Mappings.PartialMapping.html" title="class in org.apache.calcite.util.mapping">Mappings.PartialMapping</a></code>, <code><a href="../Permutation.html" title="class in org.apache.calcite.util">Permutation</a></code></dd>
</dl>
<hr>
<pre>public interface <span class="typeNameLabel">Mapping</span>
extends <a href="Mappings.FunctionMapping.html" title="interface in org.apache.calcite.util.mapping">Mappings.FunctionMapping</a>, <a href="Mappings.SourceMapping.html" title="interface in org.apache.calcite.util.mapping">Mappings.SourceMapping</a>, <a href="Mappings.TargetMapping.html" title="interface in org.apache.calcite.util.mapping">Mappings.TargetMapping</a>, <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Iterable</a>&lt;<a href="IntPair.html" title="class in org.apache.calcite.util.mapping">IntPair</a>&gt;</pre>
<div class="block">A <dfn>Mapping</dfn> is a relationship between a source domain to target
domain of integers.
<p>This interface represents the most general possible mapping. Depending on
the <a href="MappingType.html" title="enum in org.apache.calcite.util.mapping"><code>MappingType</code></a> of a particular mapping, some of the operations may
not be applicable. If you call the method, you will receive a runtime error.
For instance:
<ul>
<li>If a target has more than one source, then the method
<a href="Mappings.SourceMapping.html#getSource(int)"><code>Mappings.SourceMapping.getSource(int)</code></a> will throw
<a href="Mappings.TooManyElementsException.html" title="class in org.apache.calcite.util.mapping"><code>Mappings.TooManyElementsException</code></a>.
<li>If a source has no targets, then the method <a href="Mappings.FunctionMapping.html#getTarget(int)"><code>Mappings.FunctionMapping.getTarget(int)</code></a> will throw
<a href="Mappings.NoElementException.html" title="class in org.apache.calcite.util.mapping"><code>Mappings.NoElementException</code></a>.
</ul></div>
</section>
<section class="summary">
<ul class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<li class="blockList">
<section class="methodSummary"><a id="method.summary">
<!-- -->
</a>
<h2>Method Summary</h2>
<div class="memberSummary">
<div role="tablist" aria-orientation="horizontal"><button role="tab" aria-selected="true" aria-controls="memberSummary_tabpanel" tabindex="0" onkeydown="switchTab(event)" id="t0" class="activeTableTab">All Methods</button><button role="tab" aria-selected="false" aria-controls="memberSummary_tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t2" class="tableTab" onclick="show(2);">Instance Methods</button><button role="tab" aria-selected="false" aria-controls="memberSummary_tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t3" class="tableTab" onclick="show(4);">Abstract Methods</button></div>
<div id="memberSummary_tabpanel" role="tabpanel">
<table aria-labelledby="t0">
<thead>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr class="altColor" id="i0">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#clear()">clear</a></span>()</code></th>
<td class="colLast">
<div class="block">Removes all elements in the mapping.</div>
</td>
</tr>
<tr class="rowColor" id="i1">
<td class="colFirst"><code><a href="MappingType.html" title="enum in org.apache.calcite.util.mapping">MappingType</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMappingType()">getMappingType</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the mapping type.</div>
</td>
</tr>
<tr class="altColor" id="i2">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSourceCount()">getSourceCount</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the number of sources.</div>
</td>
</tr>
<tr class="rowColor" id="i3">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getTargetCount()">getTargetCount</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the number of targets.</div>
</td>
</tr>
<tr class="altColor" id="i4">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isIdentity()">isIdentity</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns whether this mapping is the identity.</div>
</td>
</tr>
<tr class="rowColor" id="i5">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/9/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util" class="externalLink">Iterator</a>&lt;<a href="IntPair.html" title="class in org.apache.calcite.util.mapping">IntPair</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#iterator()">iterator</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns an iterator over the elements in this mapping.</div>
</td>
</tr>
<tr class="altColor" id="i6">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#size()">size</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the number of elements in the mapping.</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="inheritedList">
<h3>Methods inherited from interface&nbsp;java.lang.<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Iterable</a></h3>
<a id="methods.inherited.from.class.java.lang.Iterable">
<!-- -->
</a><code><a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Iterable.html?is-external=true#forEach(java.util.function.Consumer)" title="class or interface in java.lang" class="externalLink">forEach</a>, <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Iterable.html?is-external=true#spliterator()" title="class or interface in java.lang" class="externalLink">spliterator</a></code></div>
<div class="inheritedList">
<h3>Methods inherited from interface&nbsp;org.apache.calcite.util.mapping.<a href="Mappings.SourceMapping.html" title="interface in org.apache.calcite.util.mapping">Mappings.SourceMapping</a></h3>
<a id="methods.inherited.from.class.org.apache.calcite.util.mapping.Mappings.SourceMapping">
<!-- -->
</a><code><a href="Mappings.SourceMapping.html#getSource(int)">getSource</a>, <a href="Mappings.SourceMapping.html#getSourceOpt(int)">getSourceOpt</a>, <a href="Mappings.SourceMapping.html#getTargetOpt(int)">getTargetOpt</a>, <a href="Mappings.SourceMapping.html#inverse()">inverse</a></code></div>
<div class="inheritedList">
<h3>Methods inherited from interface&nbsp;org.apache.calcite.util.mapping.<a href="Mappings.TargetMapping.html" title="interface in org.apache.calcite.util.mapping">Mappings.TargetMapping</a></h3>
<a id="methods.inherited.from.class.org.apache.calcite.util.mapping.Mappings.TargetMapping">
<!-- -->
</a><code><a href="Mappings.TargetMapping.html#getSourceOpt(int)">getSourceOpt</a>, <a href="Mappings.TargetMapping.html#getTarget(int)">getTarget</a>, <a href="Mappings.TargetMapping.html#getTargetOpt(int)">getTargetOpt</a>, <a href="Mappings.TargetMapping.html#inverse()">inverse</a>, <a href="Mappings.TargetMapping.html#set(int,int)">set</a></code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<li class="blockList">
<section class="methodDetails"><a id="method.detail">
<!-- -->
</a>
<h2>Method Details</h2>
<ul class="blockList">
<li class="blockList">
<section class="detail">
<h3><a id="iterator()">iterator</a></h3>
<div class="memberSignature"><span class="returnType"><a href="https://docs.oracle.com/javase/9/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util" class="externalLink">Iterator</a>&lt;<a href="IntPair.html" title="class in org.apache.calcite.util.mapping">IntPair</a>&gt;</span>&nbsp;<span class="memberName">iterator</span>()</div>
<div class="block">Returns an iterator over the elements in this mapping.
<p>This method is optional; implementations may throw
<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>UnsupportedOperationException</code></a>.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Iterable.html?is-external=true#iterator()" title="class or interface in java.lang" class="externalLink">iterator</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Iterable</a>&lt;<a href="IntPair.html" title="class in org.apache.calcite.util.mapping">IntPair</a>&gt;</code></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="getSourceCount()">getSourceCount</a></h3>
<div class="memberSignature"><span class="returnType">int</span>&nbsp;<span class="memberName">getSourceCount</span>()</div>
<div class="block">Returns the number of sources. Valid sources will be in the range 0 ..
sourceCount.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Mappings.FunctionMapping.html#getSourceCount()">getSourceCount</a></code>&nbsp;in interface&nbsp;<code><a href="Mappings.FunctionMapping.html" title="interface in org.apache.calcite.util.mapping">Mappings.FunctionMapping</a></code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Mappings.SourceMapping.html#getSourceCount()">getSourceCount</a></code>&nbsp;in interface&nbsp;<code><a href="Mappings.SourceMapping.html" title="interface in org.apache.calcite.util.mapping">Mappings.SourceMapping</a></code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Mappings.TargetMapping.html#getSourceCount()">getSourceCount</a></code>&nbsp;in interface&nbsp;<code><a href="Mappings.TargetMapping.html" title="interface in org.apache.calcite.util.mapping">Mappings.TargetMapping</a></code></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="getTargetCount()">getTargetCount</a></h3>
<div class="memberSignature"><span class="returnType">int</span>&nbsp;<span class="memberName">getTargetCount</span>()</div>
<div class="block">Returns the number of targets. Valid targets will be in the range 0 ..
targetCount.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Mappings.SourceMapping.html#getTargetCount()">getTargetCount</a></code>&nbsp;in interface&nbsp;<code><a href="Mappings.SourceMapping.html" title="interface in org.apache.calcite.util.mapping">Mappings.SourceMapping</a></code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Mappings.TargetMapping.html#getTargetCount()">getTargetCount</a></code>&nbsp;in interface&nbsp;<code><a href="Mappings.TargetMapping.html" title="interface in org.apache.calcite.util.mapping">Mappings.TargetMapping</a></code></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="getMappingType()">getMappingType</a></h3>
<div class="memberSignature"><span class="returnType"><a href="MappingType.html" title="enum in org.apache.calcite.util.mapping">MappingType</a></span>&nbsp;<span class="memberName">getMappingType</span>()</div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Mappings.CoreMapping.html#getMappingType()">Mappings.CoreMapping</a></code></span></div>
<div class="block">Returns the mapping type.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Mappings.CoreMapping.html#getMappingType()">getMappingType</a></code>&nbsp;in interface&nbsp;<code><a href="Mappings.CoreMapping.html" title="interface in org.apache.calcite.util.mapping">Mappings.CoreMapping</a></code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Mappings.FunctionMapping.html#getMappingType()">getMappingType</a></code>&nbsp;in interface&nbsp;<code><a href="Mappings.FunctionMapping.html" title="interface in org.apache.calcite.util.mapping">Mappings.FunctionMapping</a></code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Mappings.SourceMapping.html#getMappingType()">getMappingType</a></code>&nbsp;in interface&nbsp;<code><a href="Mappings.SourceMapping.html" title="interface in org.apache.calcite.util.mapping">Mappings.SourceMapping</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Mapping type</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="isIdentity()">isIdentity</a></h3>
<div class="memberSignature"><span class="returnType">boolean</span>&nbsp;<span class="memberName">isIdentity</span>()</div>
<div class="block">Returns whether this mapping is the identity.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Mappings.SourceMapping.html#isIdentity()">isIdentity</a></code>&nbsp;in interface&nbsp;<code><a href="Mappings.SourceMapping.html" title="interface in org.apache.calcite.util.mapping">Mappings.SourceMapping</a></code></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="clear()">clear</a></h3>
<div class="memberSignature"><span class="returnType">void</span>&nbsp;<span class="memberName">clear</span>()</div>
<div class="block">Removes all elements in the mapping.</div>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="size()">size</a></h3>
<div class="memberSignature"><span class="returnType">int</span>&nbsp;<span class="memberName">size</span>()</div>
<div class="block">Returns the number of elements in the mapping.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Mappings.CoreMapping.html#size()">size</a></code>&nbsp;in interface&nbsp;<code><a href="Mappings.CoreMapping.html" title="interface in org.apache.calcite.util.mapping">Mappings.CoreMapping</a></code></dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
</div>
<!-- ========= END OF CLASS DATA ========= -->
</main>
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">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">Help</a></li>
</ul>
<div class="aboutLanguage"><b>Apache Calcite</b></div>
</div>
<div class="subNav">
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
<p class="legalCopy"><small>Copyright &copy; 2012-2020 Apache Software Foundation. All Rights Reserved.</small></p>
</footer>
</div>
</div>
</body>
</html>