| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="zh"> |
| <head> |
| <!-- Generated by javadoc --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>Parameter (Apache Calcite calcite API)</title> |
| <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="Parameter (Apache Calcite calcite API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>您的浏览器已禁用 JavaScript。</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="跳过导航链接">跳过导航链接</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="导航"> |
| <li><a href="../../../../../overview-summary.html">概览</a></li> |
| <li><a href="package-summary.html">程序包</a></li> |
| <li class="navBarCell1Rev">类</li> |
| <li><a href="package-tree.html">树</a></li> |
| <li><a href="../../../../../deprecated-list.html">已过时</a></li> |
| <li><a href="../../../../../index-all.html">索引</a></li> |
| <li><a href="../../../../../help-doc.html">帮助</a></li> |
| </ul> |
| <div class="aboutLanguage"><b>Apache Calcite</b></div> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../org/apache/calcite/linq4j/function/NullableLongFunction1.html" title="org.apache.calcite.linq4j.function中的接口"><span class="typeNameLink">上一个类</span></a></li> |
| <li><a href="../../../../../org/apache/calcite/linq4j/function/Predicate1.html" title="org.apache.calcite.linq4j.function中的接口"><span class="typeNameLink">下一个类</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/calcite/linq4j/function/Parameter.html" target="_top">框架</a></li> |
| <li><a href="Parameter.html" target="_top">无框架</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../allclasses-noframe.html">所有类</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>概要: </li> |
| <li>字段 | </li> |
| <li><a href="#annotation.type.required.element.summary">必需</a> | </li> |
| <li><a href="#annotation.type.optional.element.summary">可选</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>详细资料: </li> |
| <li>字段 | </li> |
| <li><a href="#annotation.type.element.detail">元素</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.apache.calcite.linq4j.function</div> |
| <h2 title="注释类型 Parameter" class="title">注释类型 Parameter</h2> |
| </div> |
| <div class="contentContainer"> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Retention.html?is-external=true" title="java.lang.annotation中的类或接口">@Retention</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Retention.html?is-external=true#value--" title="java.lang.annotation中的类或接口">value</a>=<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/RetentionPolicy.html?is-external=true#RUNTIME" title="java.lang.annotation中的类或接口">RUNTIME</a>) |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Target.html?is-external=true" title="java.lang.annotation中的类或接口">@Target</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Target.html?is-external=true#value--" title="java.lang.annotation中的类或接口">value</a>=<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/ElementType.html?is-external=true#PARAMETER" title="java.lang.annotation中的类或接口">PARAMETER</a>) |
| public @interface <span class="memberNameLabel">Parameter</span></pre> |
| <div class="block">Annotation that supplies metadata about a function parameter. |
| |
| <p>A typical use is to derive names for the parameters of user-defined |
| functions. |
| |
| <p>Here is an example: |
| |
| <blockquote><pre> |
| public static class MyLeftFunction { |
| public String eval( |
| @Parameter(name = "s") String s, |
| @Parameter(name = "n", optional = true) Integer n) { |
| return s.substring(0, n == null ? 1 : n); |
| } |
| }</pre></blockquote> |
| |
| <p>The first parameter is named "s" and is mandatory, |
| and the second parameter is named "n" and is optional. |
| |
| <p>If this annotation is present, it supersedes information that might be |
| available via |
| <code>Executable.getParameters()</code> (JDK 1.8 and above). |
| |
| <p>If the annotation is not specified, parameters will be named "arg0", |
| "arg1" et cetera, and will be mandatory.</div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- =========== ANNOTATION TYPE REQUIRED MEMBER SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="annotation.type.required.element.summary"> |
| <!-- --> |
| </a> |
| <h3>必需元素概要</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="必需元素概要表, 列表必需的元素和解释"> |
| <caption><span>所需元素</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">限定符和类型</th> |
| <th class="colLast" scope="col">必需的元素和说明</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="java.lang中的类或接口">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/linq4j/function/Parameter.html#name--">name</a></span></code> |
| <div class="block">The name of the parameter.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- =========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="annotation.type.optional.element.summary"> |
| <!-- --> |
| </a> |
| <h3>可选元素概要</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="可选元素概要表, 列表可选元素和解释"> |
| <caption><span>可选元素</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">限定符和类型</th> |
| <th class="colLast" scope="col">可选元素和说明</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/linq4j/function/Parameter.html#optional--">optional</a></span></code> |
| <div class="block">Returns whether the parameter is optional.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="annotation.type.element.detail"> |
| <!-- --> |
| </a> |
| <h3>元素详细资料</h3> |
| <a name="name--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>name</h4> |
| <pre>public abstract <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="java.lang中的类或接口">String</a> name</pre> |
| <div class="block">The name of the parameter. |
| |
| <p>The name is used when the function is called |
| with parameter assignment, for example <code>foo(x => 1, y => 'a')</code>.</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="optional--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>optional</h4> |
| <pre>public abstract boolean optional</pre> |
| <div class="block">Returns whether the parameter is optional. |
| |
| <p>An optional parameter does not need to be specified when you call the |
| function. |
| |
| <p>If you call a function using positional parameter syntax, you can omit |
| optional parameters on the trailing edge. For example, if you have a |
| function |
| <code>baz(int a, int b optional, int c, int d optional, int e optional)</code> |
| then you can call <code>baz(a, b, c, d, e)</code> |
| or <code>baz(a, b, c, d)</code> |
| or <code>baz(a, b, c)</code> |
| but not <code>baz(a, b)</code> because <code>c</code> is not optional. |
| |
| <p>If you call a function using parameter name assignment syntax, you can |
| omit any parameter that has a default value. For example, you can call |
| <code>baz(a => 1, e => 5, c => 3)</code>, omitting optional parameters <code>b</code> |
| and <code>d</code>. |
| |
| <p>Currently, the default value used when a parameter is not specified |
| is NULL, and therefore optional parameters must be nullable.</div> |
| <dl> |
| <dt>默认值:</dt> |
| <dd>false</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="跳过导航链接">跳过导航链接</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="导航"> |
| <li><a href="../../../../../overview-summary.html">概览</a></li> |
| <li><a href="package-summary.html">程序包</a></li> |
| <li class="navBarCell1Rev">类</li> |
| <li><a href="package-tree.html">树</a></li> |
| <li><a href="../../../../../deprecated-list.html">已过时</a></li> |
| <li><a href="../../../../../index-all.html">索引</a></li> |
| <li><a href="../../../../../help-doc.html">帮助</a></li> |
| </ul> |
| <div class="aboutLanguage"><b>Apache Calcite</b></div> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../org/apache/calcite/linq4j/function/NullableLongFunction1.html" title="org.apache.calcite.linq4j.function中的接口"><span class="typeNameLink">上一个类</span></a></li> |
| <li><a href="../../../../../org/apache/calcite/linq4j/function/Predicate1.html" title="org.apache.calcite.linq4j.function中的接口"><span class="typeNameLink">下一个类</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/calcite/linq4j/function/Parameter.html" target="_top">框架</a></li> |
| <li><a href="Parameter.html" target="_top">无框架</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../allclasses-noframe.html">所有类</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>概要: </li> |
| <li>字段 | </li> |
| <li><a href="#annotation.type.required.element.summary">必需</a> | </li> |
| <li><a href="#annotation.type.optional.element.summary">可选</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>详细资料: </li> |
| <li>字段 | </li> |
| <li><a href="#annotation.type.element.detail">元素</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2012-2020 Apache Software Foundation. All Rights Reserved.</small></p> |
| </body> |
| </html> |