| <!DOCTYPE HTML> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc --> |
| <title>Util (Apache Calcite API)</title> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../jquery/jquery-ui.css" title="Style"> |
| <script type="text/javascript" src="../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jszip/dist/jszip.min.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script> |
| <!--[if IE]> |
| <script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script> |
| <![endif]--> |
| <script type="text/javascript" src="../../../../jquery/jquery-3.3.1.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jquery-migrate-3.0.1.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jquery-ui.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="Util (Apache Calcite API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var data = {"i0":9,"i1":9,"i2":41,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9,"i13":41,"i14":9,"i15":9,"i16":9,"i17":9,"i18":9,"i19":9,"i20":9,"i21":9,"i22":9,"i23":9,"i24":9,"i25":9,"i26":9,"i27":9,"i28":9,"i29":9,"i30":9,"i31":9,"i32":9,"i33":9,"i34":9,"i35":9,"i36":9,"i37":9,"i38":9,"i39":9,"i40":9,"i41":9,"i42":41,"i43":41,"i44":41,"i45":41,"i46":41,"i47":41,"i48":41,"i49":9,"i50":9,"i51":9,"i52":9,"i53":9,"i54":9,"i55":9,"i56":9,"i57":9,"i58":9,"i59":9,"i60":9,"i61":9,"i62":9,"i63":9,"i64":41,"i65":41,"i66":41,"i67":41,"i68":9,"i69":9,"i70":9,"i71":9,"i72":41,"i73":41,"i74":41,"i75":9,"i76":9,"i77":9,"i78":9,"i79":9,"i80":9,"i81":9,"i82":9,"i83":9,"i84":41,"i85":9,"i86":9,"i87":9,"i88":41,"i89":41,"i90":9,"i91":9,"i92":9,"i93":9,"i94":9,"i95":9,"i96":41,"i97":41,"i98":41,"i99":41,"i100":41,"i101":41,"i102":41,"i103":9,"i104":9,"i105":9,"i106":9,"i107":9,"i108":9,"i109":9,"i110":9,"i111":9,"i112":41,"i113":9,"i114":9,"i115":9,"i116":9,"i117":9,"i118":41,"i119":9,"i120":9}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| var pathtoroot = "../../../../"; |
| var useModuleDirectories = true; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <header role="banner"> |
| <nav role="navigation"> |
| <div class="fixedNav"> |
| <!-- ========= 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="class-use/Util.html">Use</a></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> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../allclasses.html">All Classes</a></li> |
| </ul> |
| <ul class="navListSearch"> |
| <li><label for="search">SEARCH:</label> |
| <input type="text" id="search" value="search" disabled="disabled"> |
| <input type="reset" id="reset" value="reset" disabled="disabled"> |
| </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> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li><a href="#nested.class.summary">Nested</a> | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a id="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| </div> |
| <div class="navPadding"> </div> |
| <script type="text/javascript"><!-- |
| $('.navPadding').css('padding-top', $('.fixedNav').css("height")); |
| //--> |
| </script> |
| </nav> |
| </header> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <main role="main"> |
| <div class="header"> |
| <div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">org.apache.calcite.util</a></div> |
| <h2 title="Class Util" class="title">Class Util</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li>java.lang.Object</li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.calcite.util.Util</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <pre>public class <span class="typeNameLabel">Util</span> |
| extends java.lang.Object</pre> |
| <div class="block">Miscellaneous utility functions.</div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== NESTED CLASS SUMMARY ======== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="nested.class.summary"> |
| <!-- --> |
| </a> |
| <h3>Nested Class Summary</h3> |
| <table class="memberSummary"> |
| <caption><span>Nested Classes</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Class</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Util.FilteringIterator.html" title="class in org.apache.calcite.util">Util.FilteringIterator</a><<a href="Util.FilteringIterator.html" title="type parameter in Util.FilteringIterator">T</a>></span></code></th> |
| <td class="colLast"> |
| <div class="block">Iterator that applies a predicate to each element.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Util.FoundOne.html" title="class in org.apache.calcite.util">Util.FoundOne</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Exception used to interrupt a tree walk of any kind.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Util.OverFinder.html" title="class in org.apache.calcite.util">Util.OverFinder</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Visitor which looks for an OVER clause inside a tree of |
| <a href="../sql/SqlNode.html" title="class in org.apache.calcite.sql"><code>SqlNode</code></a> objects.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>private static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Util.RandomAccessTransformingList.html" title="class in org.apache.calcite.util">Util.RandomAccessTransformingList</a><<a href="Util.RandomAccessTransformingList.html" title="type parameter in Util.RandomAccessTransformingList">F</a>,​<a href="Util.RandomAccessTransformingList.html" title="type parameter in Util.RandomAccessTransformingList">T</a>></span></code></th> |
| <td class="colLast"> |
| <div class="block">Extension to <a href="Util.TransformingList.html" title="class in org.apache.calcite.util"><code>Util.TransformingList</code></a> that implements |
| <code>RandomAccess</code>.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Util.TransformingList.html" title="class in org.apache.calcite.util">Util.TransformingList</a><<a href="Util.TransformingList.html" title="type parameter in Util.TransformingList">F</a>,​<a href="Util.TransformingList.html" title="type parameter in Util.TransformingList">T</a>></span></code></th> |
| <td class="colLast"> |
| <div class="block">List that returns the same number of elements as a backing list, |
| applying a transformation function to each one.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </section> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="field.summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <table class="memberSummary"> |
| <caption><span>Fields</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Field</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private static java.nio.charset.Charset</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#DEFAULT_CHARSET">DEFAULT_CHARSET</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>private static com.google.common.cache.LoadingCache<java.lang.Class,​java.util.Map<java.lang.String,​java.lang.Enum>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ENUM_CONSTANTS">ENUM_CONSTANTS</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Maps classes to the map of their enum values.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#FILE_SEPARATOR">FILE_SEPARATOR</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">System-dependent file separator, for example, "/" or "\."</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#FILE_TIMESTAMP_FORMAT">FILE_TIMESTAMP_FORMAT</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Datetime format string for generating a timestamp string to be used as |
| part of a filename.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private static java.util.regex.Pattern</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#JAVA_ID_PATTERN">JAVA_ID_PATTERN</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Regular expression for a valid java identifier which contains no |
| underscores and can therefore be returned intact by <a href="#toJavaId(java.lang.String,int)"><code>toJavaId(java.lang.String, int)</code></a>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#LINE_SEPARATOR">LINE_SEPARATOR</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">System-dependent newline character.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </section> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier</th> |
| <th class="colSecond" scope="col">Constructor</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private </code></td> |
| <th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E()">Util</a></span>()</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </section> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <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> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>private static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#appendPosixDaylightTransition(java.util.TimeZone,java.lang.StringBuilder,int,int,int,int,int,int,boolean,boolean)">appendPosixDaylightTransition</a></span>​(java.util.TimeZone tz, |
| java.lang.StringBuilder buf, |
| int mode, |
| int day, |
| int month, |
| int dayOfWeek, |
| int time, |
| int timeMode, |
| boolean verbose, |
| boolean isEnd)</code></th> |
| <td class="colLast"> |
| <div class="block">Writes a daylight savings time transition to a POSIX timezone |
| description.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>private static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#appendPosixTime(java.lang.StringBuilder,int)">appendPosixTime</a></span>​(java.lang.StringBuilder buf, |
| int millis)</code></th> |
| <td class="colLast"> |
| <div class="block">Given a time expressed in milliseconds, append the time formatted as |
| "hh[:mm[:ss]]".</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>static <K,​V><br>java.util.Map<K,​V></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#asIndexMap(java.util.Collection,com.google.common.base.Function)">asIndexMap</a></span>​(java.util.Collection<V> values, |
| com.google.common.base.Function<V,​K> function)</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span></div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>static <K,​V><br>java.util.Map<K,​V></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#asIndexMapJ(java.util.Collection,java.util.function.Function)">asIndexMapJ</a></span>​(java.util.Collection<V> values, |
| java.util.function.Function<V,​K> function)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a map that is a view onto a collection of values, using the |
| provided function to convert a value to a key.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>static <K,​V><br>java.util.Map<K,​V></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#blackholeMap()">blackholeMap</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a map which ignores any write operation.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>static java.util.Calendar</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#calendar()">calendar</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a <code>Calendar</code> in the UTC time zone and root locale.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>static java.util.Calendar</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#calendar(long)">calendar</a></span>​(long millis)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a <code>Calendar</code> in the UTC time zone and root locale |
| with a given time.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>static <E> java.lang.Iterable<E></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#cast(java.lang.Iterable,java.lang.Class)">cast</a></span>​(java.lang.Iterable<? super E> iterable, |
| java.lang.Class<E> clazz)</code></th> |
| <td class="colLast"> |
| <div class="block">Converts an <code>Iterable</code> whose members are automatically down-cast to |
| a given type.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>static <E> java.util.Iterator<E></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#cast(java.util.Iterator,java.lang.Class)">cast</a></span>​(java.util.Iterator<?> iter, |
| java.lang.Class<E> clazz)</code></th> |
| <td class="colLast"> |
| <div class="block">Converts a iterator whose members are automatically down-cast to a given |
| type.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>static <E> java.util.List<E></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#cast(java.util.List,java.lang.Class)">cast</a></span>​(java.util.List<? super E> list, |
| java.lang.Class<E> clazz)</code></th> |
| <td class="colLast"> |
| <div class="block">Converts a list whose members are automatically down-cast to a given |
| type.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>static <T> java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#commaList(java.util.List)">commaList</a></span>​(java.util.List<T> list)</code></th> |
| <td class="colLast"> |
| <div class="block">Converts a list of a string, with commas between elements.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#contains(java.lang.String%5B%5D,int,java.lang.String)">contains</a></span>​(java.lang.String[] a, |
| int length, |
| java.lang.String s)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns whether an array of strings contains a given string among the |
| first <code>length</code> entries.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#debugCode(java.io.PrintStream,java.lang.String)">debugCode</a></span>​(java.io.PrintStream out, |
| java.lang.String code)</code></th> |
| <td class="colLast"> |
| <div class="block">Prints the given code with line numbering.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>static <T> T</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#deprecated(T,boolean)">deprecated</a></span>​(T argument, |
| boolean fail)</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">If a piece of code calls this method, it indicates that the |
| code needs to be cleaned up.</div> |
| </div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code>private static java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#digits3(long,int)">digits3</a></span>​(long x, |
| int z)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#discard(boolean)">discard</a></span>​(boolean b)</code></th> |
| <td class="colLast"> |
| <div class="block">Does nothing with its argument.</div> |
| </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#discard(double)">discard</a></span>​(double d)</code></th> |
| <td class="colLast"> |
| <div class="block">Does nothing with its argument.</div> |
| </td> |
| </tr> |
| <tr id="i17" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#discard(int)">discard</a></span>​(int i)</code></th> |
| <td class="colLast"> |
| <div class="block">Does nothing with its argument.</div> |
| </td> |
| </tr> |
| <tr id="i18" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#discard(java.lang.Object)">discard</a></span>​(java.lang.Object o)</code></th> |
| <td class="colLast"> |
| <div class="block">Does nothing with its argument.</div> |
| </td> |
| </tr> |
| <tr id="i19" class="rowColor"> |
| <td class="colFirst"><code>static <E> java.util.List<E></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#distinctList(java.lang.Iterable)">distinctList</a></span>​(java.lang.Iterable<E> keys)</code></th> |
| <td class="colLast"> |
| <div class="block">Converts an iterable into a list with unique elements.</div> |
| </td> |
| </tr> |
| <tr id="i20" class="altColor"> |
| <td class="colFirst"><code>static <E> java.util.List<E></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#distinctList(java.util.List)">distinctList</a></span>​(java.util.List<E> list)</code></th> |
| <td class="colLast"> |
| <div class="block">Converts a list into a list with unique elements.</div> |
| </td> |
| </tr> |
| <tr id="i21" class="rowColor"> |
| <td class="colFirst"><code>static <T extends java.lang.Enum<T>><br>java.util.Map<java.lang.String,​T></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#enumConstants(java.lang.Class)">enumConstants</a></span>​(java.lang.Class<T> clazz)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a map of the values of an enumeration by name.</div> |
| </td> |
| </tr> |
| <tr id="i22" class="altColor"> |
| <td class="colFirst"><code>static <T extends java.lang.Enum<T>><br>T</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#enumVal(java.lang.Class,java.lang.String)">enumVal</a></span>​(java.lang.Class<T> clazz, |
| java.lang.String name)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the value of an enumeration with a particular name.</div> |
| </td> |
| </tr> |
| <tr id="i23" class="rowColor"> |
| <td class="colFirst"><code>static <T extends java.lang.Enum<T>><br>T</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#enumVal(T,java.lang.String)">enumVal</a></span>​(T default_, |
| java.lang.String name)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the value of an enumeration with a particular or default value if |
| not found.</div> |
| </td> |
| </tr> |
| <tr id="i24" class="altColor"> |
| <td class="colFirst"><code>static <T> boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#equalShallow(java.util.List,java.util.List)">equalShallow</a></span>​(java.util.List<? extends T> list0, |
| java.util.List<? extends T> list1)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns whether two lists are equal to each other using shallow |
| comparisons.</div> |
| </td> |
| </tr> |
| <tr id="i25" class="rowColor"> |
| <td class="colFirst"><code>static <E> java.lang.Iterable<E></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#filter(java.lang.Iterable,java.lang.Class)">filter</a></span>​(java.lang.Iterable<?> iterable, |
| java.lang.Class<E> includeFilter)</code></th> |
| <td class="colLast"> |
| <div class="block">Makes a collection of untyped elements appear as a list of strictly typed |
| elements, by filtering out those which are not of the correct type.</div> |
| </td> |
| </tr> |
| <tr id="i26" class="altColor"> |
| <td class="colFirst"><code>static <E> java.lang.Iterable<E></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#filter(java.lang.Iterable,java.util.function.Predicate)">filter</a></span>​(java.lang.Iterable<E> iterable, |
| java.util.function.Predicate<E> predicate)</code></th> |
| <td class="colLast"> |
| <div class="block">Filters an iterable.</div> |
| </td> |
| </tr> |
| <tr id="i27" class="rowColor"> |
| <td class="colFirst"><code>static <E> java.util.Collection<E></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#filter(java.util.Collection,java.lang.Class)">filter</a></span>​(java.util.Collection<?> collection, |
| java.lang.Class<E> includeFilter)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i28" class="altColor"> |
| <td class="colFirst"><code>static <E> java.util.Iterator<E></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#filter(java.util.Iterator,java.util.function.Predicate)">filter</a></span>​(java.util.Iterator<E> iterator, |
| java.util.function.Predicate<E> predicate)</code></th> |
| <td class="colLast"> |
| <div class="block">Filters an iterator.</div> |
| </td> |
| </tr> |
| <tr id="i29" class="rowColor"> |
| <td class="colFirst"><code>static <E> java.util.List<E></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#filter(java.util.List,java.lang.Class)">filter</a></span>​(java.util.List<?> list, |
| java.lang.Class<E> includeFilter)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a subset of a list containing only elements of a given type.</div> |
| </td> |
| </tr> |
| <tr id="i30" class="altColor"> |
| <td class="colFirst"><code>static int</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#findMatch(java.util.List,java.lang.String,boolean)">findMatch</a></span>​(java.util.List<java.lang.String> strings, |
| java.lang.String seek, |
| boolean caseSensitive)</code></th> |
| <td class="colLast"> |
| <div class="block">Looks for a string within a list of strings, using a given |
| case-sensitivity policy, and returns the position at which the first match |
| is found, or -1 if there are no matches.</div> |
| </td> |
| </tr> |
| <tr id="i31" class="rowColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#first(java.lang.Boolean,boolean)">first</a></span>​(java.lang.Boolean v0, |
| boolean v1)</code></th> |
| <td class="colLast"> |
| <div class="block">Unboxes a <code>Boolean</code> value, |
| using a given default value if it is null.</div> |
| </td> |
| </tr> |
| <tr id="i32" class="altColor"> |
| <td class="colFirst"><code>static byte</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#first(java.lang.Byte,byte)">first</a></span>​(java.lang.Byte v0, |
| byte v1)</code></th> |
| <td class="colLast"> |
| <div class="block">Unboxes a <code>Byte</code> value, |
| using a given default value if it is null.</div> |
| </td> |
| </tr> |
| <tr id="i33" class="rowColor"> |
| <td class="colFirst"><code>static char</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#first(java.lang.Character,char)">first</a></span>​(java.lang.Character v0, |
| char v1)</code></th> |
| <td class="colLast"> |
| <div class="block">Unboxes a <code>Character</code> value, |
| using a given default value if it is null.</div> |
| </td> |
| </tr> |
| <tr id="i34" class="altColor"> |
| <td class="colFirst"><code>static double</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#first(java.lang.Double,double)">first</a></span>​(java.lang.Double v0, |
| double v1)</code></th> |
| <td class="colLast"> |
| <div class="block">Unboxes a <code>Double</code> value, |
| using a given default value if it is null.</div> |
| </td> |
| </tr> |
| <tr id="i35" class="rowColor"> |
| <td class="colFirst"><code>static float</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#first(java.lang.Float,float)">first</a></span>​(java.lang.Float v0, |
| float v1)</code></th> |
| <td class="colLast"> |
| <div class="block">Unboxes a <code>Float</code> value, |
| using a given default value if it is null.</div> |
| </td> |
| </tr> |
| <tr id="i36" class="altColor"> |
| <td class="colFirst"><code>static int</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#first(java.lang.Integer,int)">first</a></span>​(java.lang.Integer v0, |
| int v1)</code></th> |
| <td class="colLast"> |
| <div class="block">Unboxes a <code>Integer</code> value, |
| using a given default value if it is null.</div> |
| </td> |
| </tr> |
| <tr id="i37" class="rowColor"> |
| <td class="colFirst"><code>static long</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#first(java.lang.Long,long)">first</a></span>​(java.lang.Long v0, |
| long v1)</code></th> |
| <td class="colLast"> |
| <div class="block">Unboxes a <code>Long</code> value, |
| using a given default value if it is null.</div> |
| </td> |
| </tr> |
| <tr id="i38" class="altColor"> |
| <td class="colFirst"><code>static short</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#first(java.lang.Short,short)">first</a></span>​(java.lang.Short v0, |
| short v1)</code></th> |
| <td class="colLast"> |
| <div class="block">Unboxes a <code>Short</code> value, |
| using a given default value if it is null.</div> |
| </td> |
| </tr> |
| <tr id="i39" class="rowColor"> |
| <td class="colFirst"><code>static <T> T</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#first(T,T)">first</a></span>​(T v0, |
| T v1)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the first value if it is not null, |
| otherwise the second value.</div> |
| </td> |
| </tr> |
| <tr id="i40" class="altColor"> |
| <td class="colFirst"><code>static <E> int</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#firstDuplicate(java.util.List)">firstDuplicate</a></span>​(java.util.List<E> list)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the ordinal of the first element in the list which is equal to a |
| previous element in the list.</div> |
| </td> |
| </tr> |
| <tr id="i41" class="rowColor"> |
| <td class="colFirst"><code>static java.nio.charset.Charset</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getDefaultCharset()">getDefaultCharset</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the <code>Charset</code> object representing the value of |
| <a href="../config/CalciteSystemProperty.html#DEFAULT_CHARSET"><code>CalciteSystemProperty.DEFAULT_CHARSET</code></a></div> |
| </td> |
| </tr> |
| <tr id="i42" class="altColor"> |
| <td class="colFirst"><code>static java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getFileTimestamp()">getFileTimestamp</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span></div> |
| </td> |
| </tr> |
| <tr id="i43" class="rowColor"> |
| <td class="colFirst"><code>static java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMessages(java.lang.Throwable)">getMessages</a></span>​(java.lang.Throwable t)</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span></div> |
| </td> |
| </tr> |
| <tr id="i44" class="altColor"> |
| <td class="colFirst"><code>static java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getStackTrace(java.lang.Throwable)">getStackTrace</a></span>​(java.lang.Throwable t)</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">Use <code>Throwables.getStackTraceAsString(Throwable)</code></div> |
| </div> |
| </td> |
| </tr> |
| <tr id="i45" class="rowColor"> |
| <td class="colFirst"><code>static int</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hash(int,int)">hash</a></span>​(int i, |
| int j)</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">Use <code>Objects.hash(Object...)</code></div> |
| </div> |
| </td> |
| </tr> |
| <tr id="i46" class="altColor"> |
| <td class="colFirst"><code>static int</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hash(int,java.lang.Object)">hash</a></span>​(int h, |
| java.lang.Object o)</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">Use <code>Objects.hash(Object...)</code></div> |
| </div> |
| </td> |
| </tr> |
| <tr id="i47" class="rowColor"> |
| <td class="colFirst"><code>static int</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hashArray(int,java.lang.Object%5B%5D)">hashArray</a></span>​(int h, |
| java.lang.Object[] a)</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">Use <code>Objects.hash(Object...)</code></div> |
| </div> |
| </td> |
| </tr> |
| <tr id="i48" class="altColor"> |
| <td class="colFirst"><code>static int</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hashCode(double)">hashCode</a></span>​(double v)</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">Use <a href="../runtime/Utilities.html#hashCode(double)"><code>Utilities.hashCode(double)</code></a></div> |
| </div> |
| </td> |
| </tr> |
| <tr id="i49" class="rowColor"> |
| <td class="colFirst"><code>static java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#human(double)">human</a></span>​(double d)</code></th> |
| <td class="colLast"> |
| <div class="block">Converts a number into human-readable form, with 3 digits and a "K", "M" |
| or "G" multiplier for thousands, millions or billions.</div> |
| </td> |
| </tr> |
| <tr id="i50" class="altColor"> |
| <td class="colFirst"><code>static <E> java.util.List<java.util.List<E>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#immutableCopy(java.lang.Iterable)">immutableCopy</a></span>​(java.lang.Iterable<? extends java.lang.Iterable<E>> lists)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a copy of a list of lists, making the component lists immutable if |
| they are not already.</div> |
| </td> |
| </tr> |
| <tr id="i51" class="rowColor"> |
| <td class="colFirst"><code>static <E> boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#intersects(java.util.Collection,java.util.Collection)">intersects</a></span>​(java.util.Collection<E> c0, |
| java.util.Collection<E> c1)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns whether two collections have any elements in common.</div> |
| </td> |
| </tr> |
| <tr id="i52" class="altColor"> |
| <td class="colFirst"><code>static <E> boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isDistinct(java.util.List)">isDistinct</a></span>​(java.util.List<E> list)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns whether the elements of <code>list</code> are distinct.</div> |
| </td> |
| </tr> |
| <tr id="i53" class="rowColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isNullOrEmpty(java.lang.String)">isNullOrEmpty</a></span>​(java.lang.String s)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i54" class="altColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isSingleValue(org.apache.calcite.sql.SqlCall)">isSingleValue</a></span>​(<a href="../sql/SqlCall.html" title="class in org.apache.calcite.sql">SqlCall</a> call)</code></th> |
| <td class="colLast"> |
| <div class="block">Does nothing with its argument.</div> |
| </td> |
| </tr> |
| <tr id="i55" class="rowColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isValidJavaIdentifier(java.lang.String)">isValidJavaIdentifier</a></span>​(java.lang.String s)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns true when input string is a valid Java identifier.</div> |
| </td> |
| </tr> |
| <tr id="i56" class="altColor"> |
| <td class="colFirst"><code>static <E> E</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#last(java.util.List)">last</a></span>​(java.util.List<E> list)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the last element of a list.</div> |
| </td> |
| </tr> |
| <tr id="i57" class="rowColor"> |
| <td class="colFirst"><code>static <E> java.util.List<E></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#last(java.util.List,int)">last</a></span>​(java.util.List<E> list, |
| int n)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the last <code>n</code> elements of a list.</div> |
| </td> |
| </tr> |
| <tr id="i58" class="altColor"> |
| <td class="colFirst"><code>static java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#lines(java.lang.Iterable)">lines</a></span>​(java.lang.Iterable<java.lang.String> strings)</code></th> |
| <td class="colLast"> |
| <div class="block">Converts a list of strings to a string separated by newlines.</div> |
| </td> |
| </tr> |
| <tr id="i59" class="rowColor"> |
| <td class="colFirst"><code>static java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#listToString(java.util.List)">listToString</a></span>​(java.util.List<java.lang.String> list)</code></th> |
| <td class="colLast"> |
| <div class="block">Converts ["ab", "c"] to "ab"."c".</div> |
| </td> |
| </tr> |
| <tr id="i60" class="altColor"> |
| <td class="colFirst"><code>static <K,​V><br>java.util.Map<K,​V></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#mapOf(K,V,java.lang.Object...)">mapOf</a></span>​(K key, |
| V value, |
| java.lang.Object... keyValues)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a hashmap with given contents.</div> |
| </td> |
| </tr> |
| <tr id="i61" class="rowColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#matches(boolean,java.lang.String,java.lang.String)">matches</a></span>​(boolean caseSensitive, |
| java.lang.String s0, |
| java.lang.String s1)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns whether a name matches another according to a given |
| case-sensitivity policy.</div> |
| </td> |
| </tr> |
| <tr id="i62" class="altColor"> |
| <td class="colFirst"><code>static <T> java.util.Set<T></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#minus(java.util.Set,java.util.Set)">minus</a></span>​(java.util.Set<T> set1, |
| java.util.Set<T> set2)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a set of the elements which are in <code>set1</code> but not in |
| <code>set2</code>, without modifying either.</div> |
| </td> |
| </tr> |
| <tr id="i63" class="rowColor"> |
| <td class="colFirst"><code>static java.lang.RuntimeException</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#needToImplement(java.lang.Object)">needToImplement</a></span>​(java.lang.Object o)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a <code>RuntimeException</code> indicating that a particular |
| feature has not been implemented, but should be.</div> |
| </td> |
| </tr> |
| <tr id="i64" class="altColor"> |
| <td class="colFirst"><code>static java.lang.Error</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#newInternal()">newInternal</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">Throw new <code>AssertionError</code></div> |
| </div> |
| </td> |
| </tr> |
| <tr id="i65" class="rowColor"> |
| <td class="colFirst"><code>static java.lang.Error</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#newInternal(java.lang.String)">newInternal</a></span>​(java.lang.String s)</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">Throw new <code>AssertionError</code></div> |
| </div> |
| </td> |
| </tr> |
| <tr id="i66" class="altColor"> |
| <td class="colFirst"><code>static java.lang.Error</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#newInternal(java.lang.Throwable)">newInternal</a></span>​(java.lang.Throwable e)</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">Throw new <code>RuntimeException</code> if checked; throw raw |
| exception if unchecked or <code>Error</code></div> |
| </div> |
| </td> |
| </tr> |
| <tr id="i67" class="rowColor"> |
| <td class="colFirst"><code>static java.lang.Error</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#newInternal(java.lang.Throwable,java.lang.String)">newInternal</a></span>​(java.lang.Throwable e, |
| java.lang.String s)</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">Throw new <code>AssertionError</code> if applicable; |
| or <code>RuntimeException</code> if e is checked; |
| or raw exception if e is unchecked or <code>Error</code>.</div> |
| </div> |
| </td> |
| </tr> |
| <tr id="i68" class="altColor"> |
| <td class="colFirst"><code>static double</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#nLogN(double)">nLogN</a></span>​(double d)</code></th> |
| <td class="colLast"> |
| <div class="block">Computes <code>nlogn(n)</code> using the natural logarithm (or <code> |
| n</code> if <code>n < <code>Math.E</code></code>, so the result is never |
| negative.</div> |
| </td> |
| </tr> |
| <tr id="i69" class="rowColor"> |
| <td class="colFirst"><code>static <T> java.lang.Iterable<T></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#orEmpty(java.lang.Iterable)">orEmpty</a></span>​(java.lang.Iterable<T> v0)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i70" class="altColor"> |
| <td class="colFirst"><code>static <E> java.util.List<<a href="Pair.html" title="class in org.apache.calcite.util">Pair</a><E,​E>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#pairs(java.util.List)">pairs</a></span>​(java.util.List<E> list)</code></th> |
| <td class="colLast"> |
| <div class="block">Given a list with N elements |
| [e<sub>0</sub>, e<sub>1</sub>, ..., e<sub>N-1</sub>] |
| (where N is even), returns a list of the N / 2 elements |
| [ (e<sub>0</sub>, e<sub>1</sub>), |
| (e<sub>2</sub>, e<sub>3</sub>), ...</div> |
| </td> |
| </tr> |
| <tr id="i71" class="rowColor"> |
| <td class="colFirst"><code>static java.util.Locale</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#parseLocale(java.lang.String)">parseLocale</a></span>​(java.lang.String localeString)</code></th> |
| <td class="colLast"> |
| <div class="block">Parses a locale string.</div> |
| </td> |
| </tr> |
| <tr id="i72" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#permAssert(boolean,java.lang.String)">permAssert</a></span>​(boolean b, |
| java.lang.String description)</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">Use <code>Preconditions.checkArgument(boolean)</code></div> |
| </div> |
| </td> |
| </tr> |
| <tr id="i73" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#post(boolean,java.lang.String)">post</a></span>​(boolean b, |
| java.lang.String description)</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">Use <code>Preconditions.checkArgument(boolean)</code> |
| or <code>Objects.requireNonNull(Object)</code></div> |
| </div> |
| </td> |
| </tr> |
| <tr id="i74" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#pre(boolean,java.lang.String)">pre</a></span>​(boolean b, |
| java.lang.String description)</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">Use <code>Preconditions.checkArgument(boolean)</code> |
| or <code>Objects.requireNonNull(Object)</code></div> |
| </div> |
| </td> |
| </tr> |
| <tr id="i75" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#print(java.io.PrintWriter,java.lang.Object)">print</a></span>​(java.io.PrintWriter pw, |
| java.lang.Object o)</code></th> |
| <td class="colLast"> |
| <div class="block">Prints an object using reflection.</div> |
| </td> |
| </tr> |
| <tr id="i76" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#print(java.io.PrintWriter,java.lang.Object,int)">print</a></span>​(java.io.PrintWriter pw, |
| java.lang.Object o, |
| int indent)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i77" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#printJavaString(java.lang.Appendable,java.lang.String,boolean)">printJavaString</a></span>​(java.lang.Appendable appendable, |
| java.lang.String s, |
| boolean nullMeansNull)</code></th> |
| <td class="colLast"> |
| <div class="block">Prints a string, enclosing in double quotes (") and escaping if |
| necessary.</div> |
| </td> |
| </tr> |
| <tr id="i78" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#println(java.io.PrintWriter,java.lang.Object)">println</a></span>​(java.io.PrintWriter pw, |
| java.lang.Object o)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i79" class="rowColor"> |
| <td class="colFirst"><code>static java.io.PrintWriter</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#printWriter(java.io.File)">printWriter</a></span>​(java.io.File file)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a <code>PrintWriter</code> to a given file using UTF-8 |
| character set.</div> |
| </td> |
| </tr> |
| <tr id="i80" class="altColor"> |
| <td class="colFirst"><code>static java.io.PrintWriter</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#printWriter(java.io.OutputStream)">printWriter</a></span>​(java.io.OutputStream out)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a <code>PrintWriter</code> to a given output stream using UTF-8 |
| character set.</div> |
| </td> |
| </tr> |
| <tr id="i81" class="rowColor"> |
| <td class="colFirst"><code>static <E> java.util.List<E></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#quotientList(java.util.List,int,int)">quotientList</a></span>​(java.util.List<E> list, |
| int n, |
| int k)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a list that returns every <code>n</code>th element of a list, |
| starting at element <code>k</code>.</div> |
| </td> |
| </tr> |
| <tr id="i82" class="altColor"> |
| <td class="colFirst"><code>static java.util.List<java.lang.Integer></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#range(int)">range</a></span>​(int end)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i83" class="rowColor"> |
| <td class="colFirst"><code>static java.util.List<java.lang.Integer></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#range(int,int)">range</a></span>​(int start, |
| int end)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i84" class="altColor"> |
| <td class="colFirst"><code>static java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readAllAsString(java.io.Reader)">readAllAsString</a></span>​(java.io.Reader reader)</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span></div> |
| </td> |
| </tr> |
| <tr id="i85" class="rowColor"> |
| <td class="colFirst"><code>static java.io.BufferedReader</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#reader(java.io.File)">reader</a></span>​(java.io.File file)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a <code>BufferedReader</code> to read a given file using UTF-8 |
| character set.</div> |
| </td> |
| </tr> |
| <tr id="i86" class="altColor"> |
| <td class="colFirst"><code>static java.io.BufferedReader</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#reader(java.io.InputStream)">reader</a></span>​(java.io.InputStream in)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a <code>BufferedReader</code> to a given input stream using UTF-8 |
| character set.</div> |
| </td> |
| </tr> |
| <tr id="i87" class="rowColor"> |
| <td class="colFirst"><code>static java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#replace(java.lang.String,java.lang.String,java.lang.String)">replace</a></span>​(java.lang.String s, |
| java.lang.String find, |
| java.lang.String replace)</code></th> |
| <td class="colLast"> |
| <div class="block">Replaces every occurrence of <code>find</code> in <code>s</code> with |
| <code>replace</code>.</div> |
| </td> |
| </tr> |
| <tr id="i88" class="altColor"> |
| <td class="colFirst"><code>static java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#rpad(java.lang.String,int)">rpad</a></span>​(java.lang.String s, |
| int len)</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">Use <code>Spaces.padRight(String, int)</code></div> |
| </div> |
| </td> |
| </tr> |
| <tr id="i89" class="rowColor"> |
| <td class="colFirst"><code>static java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#rtrim(java.lang.String)">rtrim</a></span>​(java.lang.String s)</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span></div> |
| </td> |
| </tr> |
| <tr id="i90" class="altColor"> |
| <td class="colFirst"><code>static <E> java.util.List<E></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#select(java.util.List,java.util.List)">select</a></span>​(java.util.List<E> list, |
| java.util.List<java.lang.Integer> ordinals)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a view of a list, picking the elements of a list with the given |
| set of ordinals.</div> |
| </td> |
| </tr> |
| <tr id="i91" class="rowColor"> |
| <td class="colFirst"><code>static <T> java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sepList(java.util.List,java.lang.String)">sepList</a></span>​(java.util.List<T> list, |
| java.lang.String sep)</code></th> |
| <td class="colLast"> |
| <div class="block">Converts a list of a string, with a given separator between elements.</div> |
| </td> |
| </tr> |
| <tr id="i92" class="altColor"> |
| <td class="colFirst"><code>static <E> java.util.List<E></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#skip(java.util.List)">skip</a></span>​(java.util.List<E> list)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns all but the first element of a list.</div> |
| </td> |
| </tr> |
| <tr id="i93" class="rowColor"> |
| <td class="colFirst"><code>static <E> java.util.List<E></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#skip(java.util.List,int)">skip</a></span>​(java.util.List<E> list, |
| int fromIndex)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns all but the first <code>n</code> elements of a list.</div> |
| </td> |
| </tr> |
| <tr id="i94" class="altColor"> |
| <td class="colFirst"><code>static <E> java.util.List<E></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#skipLast(java.util.List)">skipLast</a></span>​(java.util.List<E> list)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns every element of a list but its last element.</div> |
| </td> |
| </tr> |
| <tr id="i95" class="rowColor"> |
| <td class="colFirst"><code>static <E> java.util.List<E></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#skipLast(java.util.List,int)">skipLast</a></span>​(java.util.List<E> list, |
| int n)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns every element of a list but its last <code>n</code> elements.</div> |
| </td> |
| </tr> |
| <tr id="i96" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#squelchConnection(java.sql.Connection)">squelchConnection</a></span>​(java.sql.Connection connection)</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span></div> |
| </td> |
| </tr> |
| <tr id="i97" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#squelchJar(java.util.jar.JarFile)">squelchJar</a></span>​(java.util.jar.JarFile jar)</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span></div> |
| </td> |
| </tr> |
| <tr id="i98" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#squelchReader(java.io.Reader)">squelchReader</a></span>​(java.io.Reader reader)</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span></div> |
| </td> |
| </tr> |
| <tr id="i99" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#squelchStmt(java.sql.Statement)">squelchStmt</a></span>​(java.sql.Statement stmt)</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span></div> |
| </td> |
| </tr> |
| <tr id="i100" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#squelchStream(java.io.InputStream)">squelchStream</a></span>​(java.io.InputStream stream)</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span></div> |
| </td> |
| </tr> |
| <tr id="i101" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#squelchStream(java.io.OutputStream)">squelchStream</a></span>​(java.io.OutputStream stream)</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span></div> |
| </td> |
| </tr> |
| <tr id="i102" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#squelchWriter(java.io.Writer)">squelchWriter</a></span>​(java.io.Writer writer)</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span></div> |
| </td> |
| </tr> |
| <tr id="i103" class="rowColor"> |
| <td class="colFirst"><code>static <E> boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#startsWith(java.util.List,java.util.List)">startsWith</a></span>​(java.util.List<E> list0, |
| java.util.List<E> list1)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns whether one list is a prefix of another.</div> |
| </td> |
| </tr> |
| <tr id="i104" class="altColor"> |
| <td class="colFirst"><code>static java.util.List<java.lang.String></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#stringToList(java.lang.String)">stringToList</a></span>​(java.lang.String s)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i105" class="rowColor"> |
| <td class="colFirst"><code>static java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#stripDoubleQuotes(java.lang.String)">stripDoubleQuotes</a></span>​(java.lang.String value)</code></th> |
| <td class="colLast"> |
| <div class="block">Converts double-quoted Java strings to their contents.</div> |
| </td> |
| </tr> |
| <tr id="i106" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#swallow(java.lang.Throwable,org.slf4j.Logger)">swallow</a></span>​(java.lang.Throwable e, |
| org.slf4j.Logger logger)</code></th> |
| <td class="colLast"> |
| <div class="block">Records that an exception has been caught but will not be re-thrown.</div> |
| </td> |
| </tr> |
| <tr id="i107" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#throwIfUnchecked(java.lang.Throwable)">throwIfUnchecked</a></span>​(java.lang.Throwable throwable)</code></th> |
| <td class="colLast"> |
| <div class="block">As <code>Throwables</code><code>.throwIfUnchecked(Throwable)</code>, |
| which was introduced in Guava 20, |
| but we don't require Guava version 20 yet.</div> |
| </td> |
| </tr> |
| <tr id="i108" class="altColor"> |
| <td class="colFirst"><code>static <T> java.util.stream.Collector<T,​com.google.common.collect.ImmutableList.Builder<T>,​com.google.common.collect.ImmutableList<T>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toImmutableList()">toImmutableList</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a <code>Collector</code> that accumulates the input elements into a |
| Guava <code>ImmutableList</code> via a <code>ImmutableList.Builder</code>.</div> |
| </td> |
| </tr> |
| <tr id="i109" class="rowColor"> |
| <td class="colFirst"><code>static java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toJavaId(java.lang.String,int)">toJavaId</a></span>​(java.lang.String s, |
| int ordinal)</code></th> |
| <td class="colLast"> |
| <div class="block">Converts an arbitrary string into a string suitable for use as a Java |
| identifier.</div> |
| </td> |
| </tr> |
| <tr id="i110" class="altColor"> |
| <td class="colFirst"><code>static java.lang.Iterable<java.lang.String></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#tokenize(java.lang.String,java.lang.String)">tokenize</a></span>​(java.lang.String s, |
| java.lang.String delim)</code></th> |
| <td class="colLast"> |
| <div class="block">Converts a string into tokens.</div> |
| </td> |
| </tr> |
| <tr id="i111" class="rowColor"> |
| <td class="colFirst"><code>static java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toLinux(java.lang.String)">toLinux</a></span>​(java.lang.String s)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i112" class="altColor"> |
| <td class="colFirst"><code>static <T> java.util.List<T></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toList(java.util.Iterator)">toList</a></span>​(java.util.Iterator<T> iter)</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span></div> |
| </td> |
| </tr> |
| <tr id="i113" class="rowColor"> |
| <td class="colFirst"><code>static java.util.Map<java.lang.String,​java.lang.String></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toMap(java.util.Properties)">toMap</a></span>​(java.util.Properties properties)</code></th> |
| <td class="colLast"> |
| <div class="block">Converts a <code>Properties</code> object to a <code><code>Map</code><String, |
| String></code>.</div> |
| </td> |
| </tr> |
| <tr id="i114" class="altColor"> |
| <td class="colFirst"><code>static java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toPosix(java.util.TimeZone,boolean)">toPosix</a></span>​(java.util.TimeZone tz, |
| boolean verbose)</code></th> |
| <td class="colLast"> |
| <div class="block">Converts a Java timezone to POSIX format, so that the boost C++ library |
| can instantiate timezone objects.</div> |
| </td> |
| </tr> |
| <tr id="i115" class="rowColor"> |
| <td class="colFirst"><code>static java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toScientificNotation(java.math.BigDecimal)">toScientificNotation</a></span>​(java.math.BigDecimal bd)</code></th> |
| <td class="colLast"> |
| <div class="block">Formats a <code>BigDecimal</code> value to a string in scientific notation For |
| example<br> |
| |
| |
| A value of 0.00001234 would be formated as <code>1.234E-5</code> |
| A value of 100000.00 would be formated as <code>1.00E5</code> |
| A value of 100 (scale zero) would be formated as |
| <code>1E2</code> |
| </div> |
| </td> |
| </tr> |
| <tr id="i116" class="altColor"> |
| <td class="colFirst"><code>static <T> java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toString(java.lang.Iterable,java.lang.String,java.lang.String,java.lang.String)">toString</a></span>​(java.lang.Iterable<T> iterable, |
| java.lang.String start, |
| java.lang.String sep, |
| java.lang.String end)</code></th> |
| <td class="colLast"> |
| <div class="block">Converts an iterable to a string.</div> |
| </td> |
| </tr> |
| <tr id="i117" class="rowColor"> |
| <td class="colFirst"><code>static java.lang.RuntimeException</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toUnchecked(java.lang.Exception)">toUnchecked</a></span>​(java.lang.Exception e)</code></th> |
| <td class="colLast"> |
| <div class="block">Wraps an exception with <code>RuntimeException</code> and return it.</div> |
| </td> |
| </tr> |
| <tr id="i118" class="altColor"> |
| <td class="colFirst"><code>static java.net.URL</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toURL(java.io.File)">toURL</a></span>​(java.io.File file)</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span></div> |
| </td> |
| </tr> |
| <tr id="i119" class="rowColor"> |
| <td class="colFirst"><code>static <F,​T><br>java.util.List<T></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#transform(java.util.List,java.util.function.Function)">transform</a></span>​(java.util.List<F> list, |
| java.util.function.Function<F,​T> function)</code></th> |
| <td class="colLast"> |
| <div class="block">Transforms a list, applying a function to each element.</div> |
| </td> |
| </tr> |
| <tr id="i120" class="altColor"> |
| <td class="colFirst"><code>static <E extends java.lang.Enum<E>><br>java.lang.Error</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unexpected(E)">unexpected</a></span>​(E value)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns an exception indicating that we didn't expect to find this |
| enumeration here.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a id="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.Object</h3> |
| <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="field.detail"> |
| <!-- --> |
| </a> |
| <h3>Field Detail</h3> |
| <a id="LINE_SEPARATOR"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>LINE_SEPARATOR</h4> |
| <pre>public static final java.lang.String LINE_SEPARATOR</pre> |
| <div class="block">System-dependent newline character. |
| |
| <p>In general, you should not use this in expected results of tests. |
| Expected results should be the expected result on Linux (or Mac OS) using |
| '\n'. Apply <a href="#toLinux(java.lang.String)"><code>toLinux(String)</code></a> to Windows actual results, if |
| necessary, to make them look like Linux actual.</p></div> |
| </li> |
| </ul> |
| <a id="FILE_SEPARATOR"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>FILE_SEPARATOR</h4> |
| <pre>public static final java.lang.String FILE_SEPARATOR</pre> |
| <div class="block">System-dependent file separator, for example, "/" or "\."</div> |
| </li> |
| </ul> |
| <a id="FILE_TIMESTAMP_FORMAT"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>FILE_TIMESTAMP_FORMAT</h4> |
| <pre>public static final java.lang.String FILE_TIMESTAMP_FORMAT</pre> |
| <div class="block">Datetime format string for generating a timestamp string to be used as |
| part of a filename. Conforms to SimpleDateFormat conventions.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../constant-values.html#org.apache.calcite.util.Util.FILE_TIMESTAMP_FORMAT">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="JAVA_ID_PATTERN"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>JAVA_ID_PATTERN</h4> |
| <pre>private static final java.util.regex.Pattern JAVA_ID_PATTERN</pre> |
| <div class="block">Regular expression for a valid java identifier which contains no |
| underscores and can therefore be returned intact by <a href="#toJavaId(java.lang.String,int)"><code>toJavaId(java.lang.String, int)</code></a>.</div> |
| </li> |
| </ul> |
| <a id="DEFAULT_CHARSET"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>DEFAULT_CHARSET</h4> |
| <pre>private static final java.nio.charset.Charset DEFAULT_CHARSET</pre> |
| </li> |
| </ul> |
| <a id="ENUM_CONSTANTS"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>ENUM_CONSTANTS</h4> |
| <pre>private static final com.google.common.cache.LoadingCache<java.lang.Class,​java.util.Map<java.lang.String,​java.lang.Enum>> ENUM_CONSTANTS</pre> |
| <div class="block">Maps classes to the map of their enum values. Uses a weak map so that |
| classes are not prevented from being unloaded.</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a id="<init>()"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>Util</h4> |
| <pre>private Util()</pre> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| <!-- ============ METHOD DETAIL ========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a id="isSingleValue(org.apache.calcite.sql.SqlCall)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isSingleValue</h4> |
| <pre class="methodSignature">public static boolean isSingleValue​(<a href="../sql/SqlCall.html" title="class in org.apache.calcite.sql">SqlCall</a> call)</pre> |
| <div class="block">Does nothing with its argument. Returns whether it is ensured that |
| the call produces a single value</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>call</code> - the expression to evaluate</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Whether it is ensured that the call produces a single value</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="discard(java.lang.Object)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>discard</h4> |
| <pre class="methodSignature">public static void discard​(java.lang.Object o)</pre> |
| <div class="block">Does nothing with its argument. Call this method when you have a value |
| you are not interested in, but you don't want the compiler to warn that |
| you are not using it.</div> |
| </li> |
| </ul> |
| <a id="discard(int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>discard</h4> |
| <pre class="methodSignature">public static void discard​(int i)</pre> |
| <div class="block">Does nothing with its argument. Call this method when you have a value |
| you are not interested in, but you don't want the compiler to warn that |
| you are not using it.</div> |
| </li> |
| </ul> |
| <a id="discard(boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>discard</h4> |
| <pre class="methodSignature">public static void discard​(boolean b)</pre> |
| <div class="block">Does nothing with its argument. Call this method when you have a value |
| you are not interested in, but you don't want the compiler to warn that |
| you are not using it.</div> |
| </li> |
| </ul> |
| <a id="discard(double)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>discard</h4> |
| <pre class="methodSignature">public static void discard​(double d)</pre> |
| <div class="block">Does nothing with its argument. Call this method when you have a value |
| you are not interested in, but you don't want the compiler to warn that |
| you are not using it.</div> |
| </li> |
| </ul> |
| <a id="swallow(java.lang.Throwable,org.slf4j.Logger)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>swallow</h4> |
| <pre class="methodSignature">public static void swallow​(java.lang.Throwable e, |
| org.slf4j.Logger logger)</pre> |
| <div class="block">Records that an exception has been caught but will not be re-thrown. If |
| the tracer is not null, logs the exception to the tracer.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>e</code> - Exception</dd> |
| <dd><code>logger</code> - If not null, logs exception to this logger</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="equalShallow(java.util.List,java.util.List)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>equalShallow</h4> |
| <pre class="methodSignature">public static <T> boolean equalShallow​(java.util.List<? extends T> list0, |
| java.util.List<? extends T> list1)</pre> |
| <div class="block">Returns whether two lists are equal to each other using shallow |
| comparisons.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>list0</code> - First list</dd> |
| <dd><code>list1</code> - Second list</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Whether lists are same length and all of their elements are |
| equal using <code>==</code> (may be null).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="hash(int,int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>hash</h4> |
| <pre class="methodSignature">@Deprecated |
| public static int hash​(int i, |
| int j)</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">Use <code>Objects.hash(Object...)</code></div> |
| </div> |
| <div class="block">Combines two integers into a hash code.</div> |
| </li> |
| </ul> |
| <a id="hash(int,java.lang.Object)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>hash</h4> |
| <pre class="methodSignature">@Deprecated |
| public static int hash​(int h, |
| java.lang.Object o)</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">Use <code>Objects.hash(Object...)</code></div> |
| </div> |
| <div class="block">Computes a hash code from an existing hash code and an object (which may |
| be null).</div> |
| </li> |
| </ul> |
| <a id="hashArray(int,java.lang.Object[])"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>hashArray</h4> |
| <pre class="methodSignature">@Deprecated |
| public static int hashArray​(int h, |
| java.lang.Object[] a)</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">Use <code>Objects.hash(Object...)</code></div> |
| </div> |
| <div class="block">Computes a hash code from an existing hash code and an array of objects |
| (which may be null).</div> |
| </li> |
| </ul> |
| <a id="hashCode(double)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>hashCode</h4> |
| <pre class="methodSignature">@Deprecated |
| public static int hashCode​(double v)</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">Use <a href="../runtime/Utilities.html#hashCode(double)"><code>Utilities.hashCode(double)</code></a></div> |
| </div> |
| <div class="block">Computes the hash code of a <code>double</code> value. Equivalent to |
| <code>Double</code><code>.hashCode(double)</code>, but that method was only |
| introduced in JDK 1.8.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>v</code> - Value</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Hash code</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="minus(java.util.Set,java.util.Set)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>minus</h4> |
| <pre class="methodSignature">public static <T> java.util.Set<T> minus​(java.util.Set<T> set1, |
| java.util.Set<T> set2)</pre> |
| <div class="block">Returns a set of the elements which are in <code>set1</code> but not in |
| <code>set2</code>, without modifying either.</div> |
| </li> |
| </ul> |
| <a id="nLogN(double)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>nLogN</h4> |
| <pre class="methodSignature">public static double nLogN​(double d)</pre> |
| <div class="block">Computes <code>nlogn(n)</code> using the natural logarithm (or <code> |
| n</code> if <code>n < <code>Math.E</code></code>, so the result is never |
| negative.</div> |
| </li> |
| </ul> |
| <a id="print(java.io.PrintWriter,java.lang.Object)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>print</h4> |
| <pre class="methodSignature">public static void print​(java.io.PrintWriter pw, |
| java.lang.Object o)</pre> |
| <div class="block">Prints an object using reflection. We can handle <code>null</code>; |
| arrays of objects and primitive values; for regular objects, we print all |
| public fields.</div> |
| </li> |
| </ul> |
| <a id="print(java.io.PrintWriter,java.lang.Object,int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>print</h4> |
| <pre class="methodSignature">public static void print​(java.io.PrintWriter pw, |
| java.lang.Object o, |
| int indent)</pre> |
| </li> |
| </ul> |
| <a id="printJavaString(java.lang.Appendable,java.lang.String,boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>printJavaString</h4> |
| <pre class="methodSignature">public static void printJavaString​(java.lang.Appendable appendable, |
| java.lang.String s, |
| boolean nullMeansNull)</pre> |
| <div class="block">Prints a string, enclosing in double quotes (") and escaping if |
| necessary. For examples, <code>printDoubleQuoted(w,"x\"y",false)</code> |
| prints <code>"x\"y"</code>. |
| |
| <p>The appendable where the value is printed must not incur I/O operations. This method is |
| not meant to be used for writing the values to permanent storage.</p></div> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.IllegalStateException</code> - if the print to the specified appendable fails due to I/O</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="println(java.io.PrintWriter,java.lang.Object)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>println</h4> |
| <pre class="methodSignature">public static void println​(java.io.PrintWriter pw, |
| java.lang.Object o)</pre> |
| </li> |
| </ul> |
| <a id="toScientificNotation(java.math.BigDecimal)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toScientificNotation</h4> |
| <pre class="methodSignature">public static java.lang.String toScientificNotation​(java.math.BigDecimal bd)</pre> |
| <div class="block">Formats a <code>BigDecimal</code> value to a string in scientific notation For |
| example<br> |
| |
| <ul> |
| <li>A value of 0.00001234 would be formated as <code>1.234E-5</code></li> |
| <li>A value of 100000.00 would be formated as <code>1.00E5</code></li> |
| <li>A value of 100 (scale zero) would be formated as |
| <code>1E2</code></li> |
| </ul> |
| |
| <p>If <code>bd</code> has a precision higher than 20, this method will |
| truncate the output string to have a precision of 20 (no rounding will be |
| done, just a truncate).</div> |
| </li> |
| </ul> |
| <a id="replace(java.lang.String,java.lang.String,java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>replace</h4> |
| <pre class="methodSignature">public static java.lang.String replace​(java.lang.String s, |
| java.lang.String find, |
| java.lang.String replace)</pre> |
| <div class="block">Replaces every occurrence of <code>find</code> in <code>s</code> with |
| <code>replace</code>.</div> |
| </li> |
| </ul> |
| <a id="toURL(java.io.File)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toURL</h4> |
| <pre class="methodSignature">@Deprecated |
| public static java.net.URL toURL​(java.io.File file) |
| throws java.net.MalformedURLException</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> |
| <div class="block">Creates a file-protocol URL for the given file.</div> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.net.MalformedURLException</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getFileTimestamp()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getFileTimestamp</h4> |
| <pre class="methodSignature">@Deprecated |
| public static java.lang.String getFileTimestamp()</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> |
| <div class="block">Gets a timestamp string for use in file names. The generated timestamp |
| string reflects the current time.</div> |
| </li> |
| </ul> |
| <a id="stripDoubleQuotes(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>stripDoubleQuotes</h4> |
| <pre class="methodSignature">public static java.lang.String stripDoubleQuotes​(java.lang.String value)</pre> |
| <div class="block">Converts double-quoted Java strings to their contents. For example, |
| <code>"foo\"bar"</code> becomes <code>foo"bar</code>.</div> |
| </li> |
| </ul> |
| <a id="toJavaId(java.lang.String,int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toJavaId</h4> |
| <pre class="methodSignature">public static java.lang.String toJavaId​(java.lang.String s, |
| int ordinal)</pre> |
| <div class="block">Converts an arbitrary string into a string suitable for use as a Java |
| identifier. |
| |
| <p>The mapping is one-to-one (that is, distinct strings will produce |
| distinct java identifiers). The mapping is also reversible, but the |
| inverse mapping is not implemented.</p> |
| |
| <p>A valid Java identifier must start with a Unicode letter, underscore, |
| or dollar sign ($). The other characters, if any, can be a Unicode |
| letter, underscore, dollar sign, or digit.</p> |
| |
| <p>This method uses an algorithm similar to URL encoding. Valid |
| characters are unchanged; invalid characters are converted to an |
| underscore followed by the hex code of the character; and underscores are |
| doubled.</p> |
| |
| <p>Examples: |
| |
| <ul> |
| <li><code>toJavaId("foo")</code> returns <code>"foo"</code> |
| <li><code>toJavaId("foo bar")</code> returns <code>"foo_20_bar"</code> |
| <li><code>toJavaId("foo_bar")</code> returns <code>"foo__bar"</code> |
| <li><code>toJavaId("0bar")</code> returns <code>"_40_bar"</code> (digits |
| are illegal as a prefix) |
| <li><code>toJavaId("foo0bar")</code> returns <code>"foo0bar"</code> |
| </ul></div> |
| </li> |
| </ul> |
| <a id="isValidJavaIdentifier(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isValidJavaIdentifier</h4> |
| <pre class="methodSignature">public static boolean isValidJavaIdentifier​(java.lang.String s)</pre> |
| <div class="block">Returns true when input string is a valid Java identifier.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>s</code> - input string</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true when input string is a valid Java identifier</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="toLinux(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toLinux</h4> |
| <pre class="methodSignature">public static java.lang.String toLinux​(java.lang.String s)</pre> |
| </li> |
| </ul> |
| <a id="toList(java.util.Iterator)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toList</h4> |
| <pre class="methodSignature">@Deprecated |
| public static <T> java.util.List<T> toList​(java.util.Iterator<T> iter)</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> |
| <div class="block">Materializes the results of a <code>Iterator</code> as a |
| <code>List</code>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>iter</code> - iterator to materialize</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>materialized list</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="isNullOrEmpty(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isNullOrEmpty</h4> |
| <pre class="methodSignature">public static boolean isNullOrEmpty​(java.lang.String s)</pre> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if s==null or if s.length()==0</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="commaList(java.util.List)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>commaList</h4> |
| <pre class="methodSignature">public static <T> java.lang.String commaList​(java.util.List<T> list)</pre> |
| <div class="block">Converts a list of a string, with commas between elements. |
| |
| <p>For example, |
| <code>commaList(Arrays.asList({"a", "b"}))</code> |
| returns "a, b".</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>list</code> - List</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>String representation of string</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="sepList(java.util.List,java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>sepList</h4> |
| <pre class="methodSignature">public static <T> java.lang.String sepList​(java.util.List<T> list, |
| java.lang.String sep)</pre> |
| <div class="block">Converts a list of a string, with a given separator between elements.</div> |
| </li> |
| </ul> |
| <a id="getDefaultCharset()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getDefaultCharset</h4> |
| <pre class="methodSignature">public static java.nio.charset.Charset getDefaultCharset()</pre> |
| <div class="block">Returns the <code>Charset</code> object representing the value of |
| <a href="../config/CalciteSystemProperty.html#DEFAULT_CHARSET"><code>CalciteSystemProperty.DEFAULT_CHARSET</code></a></div> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.nio.charset.IllegalCharsetNameException</code> - If the given charset |
| name is illegal</dd> |
| <dd><code>java.nio.charset.UnsupportedCharsetException</code> - If no support for |
| the named charset is |
| available in this |
| instance of the Java |
| virtual machine</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="newInternal()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>newInternal</h4> |
| <pre class="methodSignature">@Deprecated |
| public static java.lang.Error newInternal()</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">Throw new <code>AssertionError</code></div> |
| </div> |
| </li> |
| </ul> |
| <a id="newInternal(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>newInternal</h4> |
| <pre class="methodSignature">@Deprecated |
| public static java.lang.Error newInternal​(java.lang.String s)</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">Throw new <code>AssertionError</code></div> |
| </div> |
| </li> |
| </ul> |
| <a id="newInternal(java.lang.Throwable)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>newInternal</h4> |
| <pre class="methodSignature">@Deprecated |
| public static java.lang.Error newInternal​(java.lang.Throwable e)</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">Throw new <code>RuntimeException</code> if checked; throw raw |
| exception if unchecked or <code>Error</code></div> |
| </div> |
| </li> |
| </ul> |
| <a id="newInternal(java.lang.Throwable,java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>newInternal</h4> |
| <pre class="methodSignature">public static java.lang.Error newInternal​(java.lang.Throwable e, |
| java.lang.String s)</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">Throw new <code>AssertionError</code> if applicable; |
| or <code>RuntimeException</code> if e is checked; |
| or raw exception if e is unchecked or <code>Error</code>.</div> |
| </div> |
| </li> |
| </ul> |
| <a id="throwIfUnchecked(java.lang.Throwable)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>throwIfUnchecked</h4> |
| <pre class="methodSignature">public static void throwIfUnchecked​(java.lang.Throwable throwable)</pre> |
| <div class="block">As <code>Throwables</code><code>.throwIfUnchecked(Throwable)</code>, |
| which was introduced in Guava 20, |
| but we don't require Guava version 20 yet.</div> |
| </li> |
| </ul> |
| <a id="toUnchecked(java.lang.Exception)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toUnchecked</h4> |
| <pre class="methodSignature">public static java.lang.RuntimeException toUnchecked​(java.lang.Exception e)</pre> |
| <div class="block">Wraps an exception with <code>RuntimeException</code> and return it. |
| If the exception is already an instance of RuntimeException, |
| returns it directly.</div> |
| </li> |
| </ul> |
| <a id="getMessages(java.lang.Throwable)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getMessages</h4> |
| <pre class="methodSignature">@Deprecated |
| public static java.lang.String getMessages​(java.lang.Throwable t)</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> |
| <div class="block">Retrieves messages in a exception and writes them to a string. In the |
| string returned, each message will appear on a different line.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a non-null string containing all messages of the exception</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getStackTrace(java.lang.Throwable)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getStackTrace</h4> |
| <pre class="methodSignature">@Deprecated |
| public static java.lang.String getStackTrace​(java.lang.Throwable t)</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">Use <code>Throwables.getStackTraceAsString(Throwable)</code></div> |
| </div> |
| <div class="block">Returns the stack trace of a throwable. Called from native code.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>t</code> - Throwable</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Stack trace</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="pre(boolean,java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>pre</h4> |
| <pre class="methodSignature">@Deprecated |
| public static void pre​(boolean b, |
| java.lang.String description)</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">Use <code>Preconditions.checkArgument(boolean)</code> |
| or <code>Objects.requireNonNull(Object)</code></div> |
| </div> |
| </li> |
| </ul> |
| <a id="post(boolean,java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>post</h4> |
| <pre class="methodSignature">@Deprecated |
| public static void post​(boolean b, |
| java.lang.String description)</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">Use <code>Preconditions.checkArgument(boolean)</code> |
| or <code>Objects.requireNonNull(Object)</code></div> |
| </div> |
| </li> |
| </ul> |
| <a id="permAssert(boolean,java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>permAssert</h4> |
| <pre class="methodSignature">@Deprecated |
| public static void permAssert​(boolean b, |
| java.lang.String description)</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">Use <code>Preconditions.checkArgument(boolean)</code></div> |
| </div> |
| </li> |
| </ul> |
| <a id="needToImplement(java.lang.Object)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>needToImplement</h4> |
| <pre class="methodSignature">public static java.lang.RuntimeException needToImplement​(java.lang.Object o)</pre> |
| <div class="block">Returns a <code>RuntimeException</code> indicating that a particular |
| feature has not been implemented, but should be. |
| |
| <p>If every 'hole' in our functionality uses this method, it will be |
| easier for us to identity the holes. Throwing a |
| <code>UnsupportedOperationException</code> isn't as good, because |
| sometimes we actually want to partially implement an API. |
| |
| <p>Example usage: |
| |
| <blockquote> |
| <pre><code>class MyVisitor extends BaseVisitor { |
| void accept(Foo foo) { |
| // Exception will identify which subclass forgot to override |
| // this method |
| throw Util.needToImplement(this); |
| } |
| }</code></pre> |
| </blockquote></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>o</code> - The object which was the target of the call, or null. Passing |
| the object gives crucial information if a method needs to be |
| overridden and a subclass forgot to do so.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>an <code>UnsupportedOperationException</code>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="deprecated(java.lang.Object,boolean)"> |
| <!-- --> |
| </a><a id="deprecated(T,boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>deprecated</h4> |
| <pre class="methodSignature">public static <T> T deprecated​(T argument, |
| boolean fail)</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">If a piece of code calls this method, it indicates that the |
| code needs to be cleaned up.</div> |
| </div> |
| <div class="block">Flags a piece of code as needing to be cleaned up before you check in. |
| |
| <p>Introduce a call to this method to indicate that a piece of code, or a |
| javadoc comment, needs work before you check in. If you have an IDE which |
| can easily trace references, this is an easy way to maintain a to-do |
| list. |
| |
| <p><strong>Checked-in code must never call this method</strong>: you must |
| remove all calls/references to this method before you check in. |
| |
| <p>The <code>argument</code> has generic type and determines the type of |
| the result. This allows you to use the method inside an expression, for |
| example |
| |
| <blockquote> |
| <pre><code>int x = Util.deprecated(0, false);</code></pre> |
| </blockquote> |
| |
| <p>but the usual usage is to pass in a descriptive string. |
| |
| <h3>Examples</h3> |
| |
| <h4>Example #1: Using <code>deprecated</code> to fail if a piece of |
| supposedly dead code is reached</h4> |
| |
| <blockquote> |
| <pre><code>void foo(int x) { |
| if (x < 0) { |
| // If this code is executed, an error will be thrown. |
| Util.deprecated( |
| "no longer need to handle negative numbers", true); |
| bar(x); |
| } else { |
| baz(x); |
| } |
| }</code></pre> |
| </blockquote> |
| |
| <h4>Example #2: Using <code>deprecated</code> to comment out dead |
| code</h4> |
| |
| <blockquote> |
| <pre>if (Util.deprecated(false, false)) { |
| // This code will not be executed, but an error will not be thrown. |
| baz(); |
| }</pre> |
| </blockquote></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>argument</code> - Arbitrary argument to the method.</dd> |
| <dd><code>fail</code> - Whether to throw an exception if this method is called</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The value of the <code>argument</code>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="contains(java.lang.String[],int,java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>contains</h4> |
| <pre class="methodSignature">public static boolean contains​(java.lang.String[] a, |
| int length, |
| java.lang.String s)</pre> |
| <div class="block">Returns whether an array of strings contains a given string among the |
| first <code>length</code> entries.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>a</code> - Array of strings</dd> |
| <dd><code>length</code> - Number of entries to search</dd> |
| <dd><code>s</code> - String to seek</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Whether array contains the name</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="readAllAsString(java.io.Reader)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>readAllAsString</h4> |
| <pre class="methodSignature">@Deprecated |
| public static java.lang.String readAllAsString​(java.io.Reader reader) |
| throws java.io.IOException</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> |
| <div class="block">Reads all remaining contents from a <code>Reader</code> and returns |
| them as a string.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>reader</code> - reader to read from</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>reader contents as string</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="squelchJar(java.util.jar.JarFile)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>squelchJar</h4> |
| <pre class="methodSignature">@Deprecated |
| public static void squelchJar​(java.util.jar.JarFile jar)</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> |
| <div class="block">Closes a Jar, ignoring any I/O exception. This should only be |
| used in finally blocks when it's necessary to avoid throwing an exception |
| which might mask a real exception.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>jar</code> - jar to close</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="squelchStream(java.io.InputStream)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>squelchStream</h4> |
| <pre class="methodSignature">@Deprecated |
| public static void squelchStream​(java.io.InputStream stream)</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> |
| <div class="block">Closes an InputStream, ignoring any I/O exception. This should only be |
| used in finally blocks when it's necessary to avoid throwing an exception |
| which might mask a real exception.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>stream</code> - stream to close</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="squelchStream(java.io.OutputStream)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>squelchStream</h4> |
| <pre class="methodSignature">@Deprecated |
| public static void squelchStream​(java.io.OutputStream stream)</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> |
| <div class="block">Closes an OutputStream, ignoring any I/O exception. This should only be |
| used in finally blocks when it's necessary to avoid throwing an exception |
| which might mask a real exception. If you want to make sure that data has |
| been successfully flushed, do NOT use this anywhere else; use |
| stream.close() instead.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>stream</code> - stream to close</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="squelchReader(java.io.Reader)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>squelchReader</h4> |
| <pre class="methodSignature">@Deprecated |
| public static void squelchReader​(java.io.Reader reader)</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> |
| <div class="block">Closes a Reader, ignoring any I/O exception. This should only be used in |
| finally blocks when it's necessary to avoid throwing an exception which |
| might mask a real exception.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>reader</code> - reader to close</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="squelchWriter(java.io.Writer)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>squelchWriter</h4> |
| <pre class="methodSignature">@Deprecated |
| public static void squelchWriter​(java.io.Writer writer)</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> |
| <div class="block">Closes a Writer, ignoring any I/O exception. This should only be used in |
| finally blocks when it's necessary to avoid throwing an exception which |
| might mask a real exception. If you want to make sure that data has been |
| successfully flushed, do NOT use this anywhere else; use writer.close() |
| instead.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>writer</code> - writer to close</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="squelchStmt(java.sql.Statement)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>squelchStmt</h4> |
| <pre class="methodSignature">@Deprecated |
| public static void squelchStmt​(java.sql.Statement stmt)</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> |
| <div class="block">Closes a Statement, ignoring any SQL exception. This should only be used |
| in finally blocks when it's necessary to avoid throwing an exception |
| which might mask a real exception.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>stmt</code> - stmt to close</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="squelchConnection(java.sql.Connection)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>squelchConnection</h4> |
| <pre class="methodSignature">@Deprecated |
| public static void squelchConnection​(java.sql.Connection connection)</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> |
| <div class="block">Closes a Connection, ignoring any SQL exception. This should only be used |
| in finally blocks when it's necessary to avoid throwing an exception |
| which might mask a real exception.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>connection</code> - connection to close</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="rtrim(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>rtrim</h4> |
| <pre class="methodSignature">@Deprecated |
| public static java.lang.String rtrim​(java.lang.String s)</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> |
| <div class="block">Trims trailing spaces from a string.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>s</code> - string to be trimmed</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>trimmed string</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="rpad(java.lang.String,int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>rpad</h4> |
| <pre class="methodSignature">@Deprecated |
| public static java.lang.String rpad​(java.lang.String s, |
| int len)</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">Use <code>Spaces.padRight(String, int)</code></div> |
| </div> |
| <div class="block">Pads a string with spaces up to a given length.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>s</code> - string to be padded</dd> |
| <dd><code>len</code> - desired length</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>padded string</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="toString(java.lang.Iterable,java.lang.String,java.lang.String,java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toString</h4> |
| <pre class="methodSignature">public static <T> java.lang.String toString​(java.lang.Iterable<T> iterable, |
| java.lang.String start, |
| java.lang.String sep, |
| java.lang.String end)</pre> |
| <div class="block">Converts an iterable to a string.</div> |
| </li> |
| </ul> |
| <a id="lines(java.lang.Iterable)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>lines</h4> |
| <pre class="methodSignature">public static java.lang.String lines​(java.lang.Iterable<java.lang.String> strings)</pre> |
| <div class="block">Converts a list of strings to a string separated by newlines.</div> |
| </li> |
| </ul> |
| <a id="tokenize(java.lang.String,java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>tokenize</h4> |
| <pre class="methodSignature">public static java.lang.Iterable<java.lang.String> tokenize​(java.lang.String s, |
| java.lang.String delim)</pre> |
| <div class="block">Converts a string into tokens.</div> |
| </li> |
| </ul> |
| <a id="toPosix(java.util.TimeZone,boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toPosix</h4> |
| <pre class="methodSignature">public static java.lang.String toPosix​(java.util.TimeZone tz, |
| boolean verbose)</pre> |
| <div class="block">Converts a Java timezone to POSIX format, so that the boost C++ library |
| can instantiate timezone objects. |
| |
| <p><a href="http://www.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap08.html">POSIX |
| IEEE 1003.1</a> defines a format for timezone specifications. |
| |
| <p>The boost C++ library can read these specifications and instantiate <a href="http://www.boost.org/doc/html/date_time/local_time.html#date_time.local_time.posix_time_zone"> |
| posix_time_zone</a> objects from them. The purpose of this method, |
| therefore, is to allow the C++ code such as the fennel calculator to use |
| the same notion of timezone as Java code. |
| |
| <p>The format is as follows: |
| |
| <blockquote>"std offset dst [offset],start[/time],end[/time]" |
| </blockquote> |
| |
| <p>where: |
| |
| <ul> |
| <li>'std' specifies the abbrev of the time zone. |
| <li>'offset' is the offset from UTC, and takes the form |
| <code>[+|-]hh[:mm[:ss]] {h=0-23, m/s=0-59}</code></li> |
| <li>'dst' specifies the abbrev of the time zone during daylight savings |
| time |
| <li>The second offset is how many hours changed during DST. Default=1 |
| <li>'start' and 'end' are the dates when DST goes into (and out of) |
| effect.<br> |
| <br> |
| They can each be one of three forms: |
| |
| <ol> |
| <li>Mm.w.d {month=1-12, week=1-5 (5 is always last), day=0-6} |
| <li>Jn {n=1-365 Feb29 is never counted} |
| <li>n {n=0-365 Feb29 is counted in leap years} |
| </ol> |
| </li> |
| |
| <li>'time' has the same format as 'offset', and defaults to 02:00:00.</li> |
| </ul> |
| |
| <p>For example:</p> |
| |
| <ul> |
| <li>"PST-8PDT01:00:00,M4.1.0/02:00:00,M10.1.0/02:00:00"; or more tersely |
| <li>"PST-8PDT,M4.1.0,M10.1.0" |
| </ul> |
| |
| <p>(Real format strings do not contain spaces; they are in the above |
| template only for readability.) |
| |
| <p>Boost apparently diverges from the POSIX standard in how it treats the |
| sign of timezone offsets. The POSIX standard states '<i>If preceded by a |
| '-', the timezone shall be east of the Prime Meridian; otherwise, it |
| shall be west</i>', yet boost requires the opposite. For instance, PST |
| has offset '-8' above. This method generates timezone strings consistent |
| with boost's expectations.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>tz</code> - Timezone</dd> |
| <dd><code>verbose</code> - Whether to include fields which can be omitted because |
| they have their default values</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Timezone in POSIX format (offset sign reversed, per boost's |
| idiosyncracies)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="appendPosixDaylightTransition(java.util.TimeZone,java.lang.StringBuilder,int,int,int,int,int,int,boolean,boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>appendPosixDaylightTransition</h4> |
| <pre class="methodSignature">private static void appendPosixDaylightTransition​(java.util.TimeZone tz, |
| java.lang.StringBuilder buf, |
| int mode, |
| int day, |
| int month, |
| int dayOfWeek, |
| int time, |
| int timeMode, |
| boolean verbose, |
| boolean isEnd)</pre> |
| <div class="block">Writes a daylight savings time transition to a POSIX timezone |
| description.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>tz</code> - Timezone</dd> |
| <dd><code>buf</code> - Buffer to append to</dd> |
| <dd><code>mode</code> - Transition mode</dd> |
| <dd><code>day</code> - Day of transition</dd> |
| <dd><code>month</code> - Month of transition</dd> |
| <dd><code>dayOfWeek</code> - Day of week of transition</dd> |
| <dd><code>time</code> - Time of transition in millis</dd> |
| <dd><code>timeMode</code> - Mode of time transition</dd> |
| <dd><code>verbose</code> - Verbose</dd> |
| <dd><code>isEnd</code> - Whether this transition is leaving DST</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="appendPosixTime(java.lang.StringBuilder,int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>appendPosixTime</h4> |
| <pre class="methodSignature">private static void appendPosixTime​(java.lang.StringBuilder buf, |
| int millis)</pre> |
| <div class="block">Given a time expressed in milliseconds, append the time formatted as |
| "hh[:mm[:ss]]".</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>buf</code> - Buffer to append to</dd> |
| <dd><code>millis</code> - Milliseconds</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="parseLocale(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>parseLocale</h4> |
| <pre class="methodSignature">public static java.util.Locale parseLocale​(java.lang.String localeString)</pre> |
| <div class="block">Parses a locale string. |
| |
| <p>The inverse operation of <code>Locale.toString()</code>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>localeString</code> - Locale string, e.g. "en" or "en_US"</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Java locale object</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="cast(java.util.List,java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>cast</h4> |
| <pre class="methodSignature">public static <E> java.util.List<E> cast​(java.util.List<? super E> list, |
| java.lang.Class<E> clazz)</pre> |
| <div class="block">Converts a list whose members are automatically down-cast to a given |
| type. |
| |
| <p>If a member of the backing list is not an instanceof <code>E</code>, |
| the accessing method (such as <code>List.get(int)</code>) will throw a |
| <code>ClassCastException</code>. |
| |
| <p>All modifications are automatically written to the backing list. Not |
| synchronized.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>list</code> - Backing list.</dd> |
| <dd><code>clazz</code> - Class to cast to.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>A list whose members are of the desired type.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="cast(java.util.Iterator,java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>cast</h4> |
| <pre class="methodSignature">public static <E> java.util.Iterator<E> cast​(java.util.Iterator<?> iter, |
| java.lang.Class<E> clazz)</pre> |
| <div class="block">Converts a iterator whose members are automatically down-cast to a given |
| type. |
| |
| <p>If a member of the backing iterator is not an instanceof <code> |
| E</code>, <code>Iterator.next()</code>) will throw a |
| <code>ClassCastException</code>. |
| |
| <p>All modifications are automatically written to the backing iterator. |
| Not synchronized.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>iter</code> - Backing iterator.</dd> |
| <dd><code>clazz</code> - Class to cast to.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>An iterator whose members are of the desired type.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="cast(java.lang.Iterable,java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>cast</h4> |
| <pre class="methodSignature">public static <E> java.lang.Iterable<E> cast​(java.lang.Iterable<? super E> iterable, |
| java.lang.Class<E> clazz)</pre> |
| <div class="block">Converts an <code>Iterable</code> whose members are automatically down-cast to |
| a given type. |
| |
| <p>All modifications are automatically written to the backing iterator. |
| Not synchronized.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>iterable</code> - Backing iterable</dd> |
| <dd><code>clazz</code> - Class to cast to</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>An iterable whose members are of the desired type.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="filter(java.lang.Iterable,java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>filter</h4> |
| <pre class="methodSignature">public static <E> java.lang.Iterable<E> filter​(java.lang.Iterable<?> iterable, |
| java.lang.Class<E> includeFilter)</pre> |
| <div class="block">Makes a collection of untyped elements appear as a list of strictly typed |
| elements, by filtering out those which are not of the correct type. |
| |
| <p>The returned object is an <code>Iterable</code>, |
| which makes it ideal for use with the 'foreach' construct. For example, |
| |
| <blockquote><code>List<Number> numbers = Arrays.asList(1, 2, 3.14, |
| 4, null, 6E23);<br> |
| for (int myInt : filter(numbers, Integer.class)) {<br> |
| print(i);<br> |
| }</code></blockquote> |
| |
| <p>will print 1, 2, 4.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>iterable</code> - Iterable</dd> |
| <dd><code>includeFilter</code> - Class whose instances to include</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="filter(java.util.Collection,java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>filter</h4> |
| <pre class="methodSignature">public static <E> java.util.Collection<E> filter​(java.util.Collection<?> collection, |
| java.lang.Class<E> includeFilter)</pre> |
| </li> |
| </ul> |
| <a id="filter(java.util.List,java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>filter</h4> |
| <pre class="methodSignature">public static <E> java.util.List<E> filter​(java.util.List<?> list, |
| java.lang.Class<E> includeFilter)</pre> |
| <div class="block">Returns a subset of a list containing only elements of a given type. |
| |
| <p>Modifications to the list are NOT written back to the source list.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>list</code> - List of objects</dd> |
| <dd><code>includeFilter</code> - Class to filter for</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>List of objects of given class (or a subtype)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="toMap(java.util.Properties)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toMap</h4> |
| <pre class="methodSignature">public static java.util.Map<java.lang.String,​java.lang.String> toMap​(java.util.Properties properties)</pre> |
| <div class="block">Converts a <code>Properties</code> object to a <code><code>Map</code><String, |
| String></code>. |
| |
| <p>This is necessary because <code>Properties</code> is a dinosaur class. It |
| ought to extend <code>Map<String,String></code>, but instead |
| extends <code><code>Hashtable</code><Object,Object></code>. |
| |
| <p>Typical usage, to iterate over a <code>Properties</code>: |
| |
| <blockquote> |
| <code> |
| Properties properties;<br> |
| for (Map.Entry<String, String> entry = |
| Util.toMap(properties).entrySet()) {<br> |
| println("key=" + entry.getKey() + ", value=" + entry.getValue());<br> |
| } |
| </code> |
| </blockquote></div> |
| </li> |
| </ul> |
| <a id="mapOf(java.lang.Object,java.lang.Object,java.lang.Object[])"> |
| <!-- --> |
| </a><a id="mapOf(K,V,java.lang.Object...)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>mapOf</h4> |
| <pre class="methodSignature">public static <K,​V> java.util.Map<K,​V> mapOf​(K key, |
| V value, |
| java.lang.Object... keyValues)</pre> |
| <div class="block">Returns a hashmap with given contents. |
| |
| <p>Use this method in initializers. Type parameters are inferred from |
| context, and the contents are initialized declaratively. For example, |
| |
| <blockquote><code>Map<String, Integer> population =<br> |
| Olap4jUtil.mapOf(<br> |
| "UK", 65000000,<br> |
| "USA", 300000000);</code></blockquote></div> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>K</code> - Key type</dd> |
| <dd><code>V</code> - Value type</dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>key</code> - First key</dd> |
| <dd><code>value</code> - First value</dd> |
| <dd><code>keyValues</code> - Second and sequent key/value pairs</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Map with given contents</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="unexpected(java.lang.Enum)"> |
| <!-- --> |
| </a><a id="unexpected(E)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>unexpected</h4> |
| <pre class="methodSignature">public static <E extends java.lang.Enum<E>> java.lang.Error unexpected​(E value)</pre> |
| <div class="block">Returns an exception indicating that we didn't expect to find this |
| enumeration here.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - Enumeration value which was not expected</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>an error, to be thrown</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="enumConstants(java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>enumConstants</h4> |
| <pre class="methodSignature">public static <T extends java.lang.Enum<T>> java.util.Map<java.lang.String,​T> enumConstants​(java.lang.Class<T> clazz)</pre> |
| <div class="block">Creates a map of the values of an enumeration by name.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>clazz</code> - Enumeration class</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>map of values</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="enumVal(java.lang.Class,java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>enumVal</h4> |
| <pre class="methodSignature">public static <T extends java.lang.Enum<T>> T enumVal​(java.lang.Class<T> clazz, |
| java.lang.String name)</pre> |
| <div class="block">Returns the value of an enumeration with a particular name. |
| |
| <p>Similar to <code>Enum.valueOf(Class, String)</code>, but returns <code> |
| null</code> rather than throwing <code>IllegalArgumentException</code>.</div> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>T</code> - Enum class type</dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>clazz</code> - Enum class</dd> |
| <dd><code>name</code> - Name of enum constant</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Enum constant or null</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="enumVal(java.lang.Enum,java.lang.String)"> |
| <!-- --> |
| </a><a id="enumVal(T,java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>enumVal</h4> |
| <pre class="methodSignature">public static <T extends java.lang.Enum<T>> T enumVal​(T default_, |
| java.lang.String name)</pre> |
| <div class="block">Returns the value of an enumeration with a particular or default value if |
| not found.</div> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>T</code> - Enum class type</dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>default_</code> - Default value (not null)</dd> |
| <dd><code>name</code> - Name of enum constant</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Enum constant, never null</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="quotientList(java.util.List,int,int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>quotientList</h4> |
| <pre class="methodSignature">public static <E> java.util.List<E> quotientList​(java.util.List<E> list, |
| int n, |
| int k)</pre> |
| <div class="block">Creates a list that returns every <code>n</code>th element of a list, |
| starting at element <code>k</code>. |
| |
| <p>It is OK if the list is empty or its size is not a multiple of |
| <code>n</code>.</p> |
| |
| <p>For instance, <code>quotientList(list, 2, 0)</code> returns the even |
| elements of a list, and <code>quotientList(list, 2, 1)</code> returns the odd |
| elements. Those lists are the same length only if list has even size.</p></div> |
| </li> |
| </ul> |
| <a id="pairs(java.util.List)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>pairs</h4> |
| <pre class="methodSignature">public static <E> java.util.List<<a href="Pair.html" title="class in org.apache.calcite.util">Pair</a><E,​E>> pairs​(java.util.List<E> list)</pre> |
| <div class="block">Given a list with N elements |
| [e<sub>0</sub>, e<sub>1</sub>, ..., e<sub>N-1</sub>] |
| (where N is even), returns a list of the N / 2 elements |
| [ (e<sub>0</sub>, e<sub>1</sub>), |
| (e<sub>2</sub>, e<sub>3</sub>), ... ].</div> |
| </li> |
| </ul> |
| <a id="first(java.lang.Object,java.lang.Object)"> |
| <!-- --> |
| </a><a id="first(T,T)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>first</h4> |
| <pre class="methodSignature">public static <T> T first​(T v0, |
| T v1)</pre> |
| <div class="block">Returns the first value if it is not null, |
| otherwise the second value. |
| |
| <p>The result may be null. |
| |
| <p>Equivalent to the Elvis operator (<code>?:</code>) of languages such as |
| Groovy or PHP.</div> |
| </li> |
| </ul> |
| <a id="first(java.lang.Double,double)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>first</h4> |
| <pre class="methodSignature">public static double first​(java.lang.Double v0, |
| double v1)</pre> |
| <div class="block">Unboxes a <code>Double</code> value, |
| using a given default value if it is null.</div> |
| </li> |
| </ul> |
| <a id="first(java.lang.Float,float)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>first</h4> |
| <pre class="methodSignature">public static float first​(java.lang.Float v0, |
| float v1)</pre> |
| <div class="block">Unboxes a <code>Float</code> value, |
| using a given default value if it is null.</div> |
| </li> |
| </ul> |
| <a id="first(java.lang.Integer,int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>first</h4> |
| <pre class="methodSignature">public static int first​(java.lang.Integer v0, |
| int v1)</pre> |
| <div class="block">Unboxes a <code>Integer</code> value, |
| using a given default value if it is null.</div> |
| </li> |
| </ul> |
| <a id="first(java.lang.Long,long)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>first</h4> |
| <pre class="methodSignature">public static long first​(java.lang.Long v0, |
| long v1)</pre> |
| <div class="block">Unboxes a <code>Long</code> value, |
| using a given default value if it is null.</div> |
| </li> |
| </ul> |
| <a id="first(java.lang.Boolean,boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>first</h4> |
| <pre class="methodSignature">public static boolean first​(java.lang.Boolean v0, |
| boolean v1)</pre> |
| <div class="block">Unboxes a <code>Boolean</code> value, |
| using a given default value if it is null.</div> |
| </li> |
| </ul> |
| <a id="first(java.lang.Short,short)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>first</h4> |
| <pre class="methodSignature">public static short first​(java.lang.Short v0, |
| short v1)</pre> |
| <div class="block">Unboxes a <code>Short</code> value, |
| using a given default value if it is null.</div> |
| </li> |
| </ul> |
| <a id="first(java.lang.Character,char)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>first</h4> |
| <pre class="methodSignature">public static char first​(java.lang.Character v0, |
| char v1)</pre> |
| <div class="block">Unboxes a <code>Character</code> value, |
| using a given default value if it is null.</div> |
| </li> |
| </ul> |
| <a id="first(java.lang.Byte,byte)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>first</h4> |
| <pre class="methodSignature">public static byte first​(java.lang.Byte v0, |
| byte v1)</pre> |
| <div class="block">Unboxes a <code>Byte</code> value, |
| using a given default value if it is null.</div> |
| </li> |
| </ul> |
| <a id="orEmpty(java.lang.Iterable)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>orEmpty</h4> |
| <pre class="methodSignature">public static <T> java.lang.Iterable<T> orEmpty​(java.lang.Iterable<T> v0)</pre> |
| </li> |
| </ul> |
| <a id="last(java.util.List)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>last</h4> |
| <pre class="methodSignature">public static <E> E last​(java.util.List<E> list)</pre> |
| <div class="block">Returns the last element of a list.</div> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.IndexOutOfBoundsException</code> - if the list is empty</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="skipLast(java.util.List)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>skipLast</h4> |
| <pre class="methodSignature">public static <E> java.util.List<E> skipLast​(java.util.List<E> list)</pre> |
| <div class="block">Returns every element of a list but its last element.</div> |
| </li> |
| </ul> |
| <a id="skipLast(java.util.List,int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>skipLast</h4> |
| <pre class="methodSignature">public static <E> java.util.List<E> skipLast​(java.util.List<E> list, |
| int n)</pre> |
| <div class="block">Returns every element of a list but its last <code>n</code> elements.</div> |
| </li> |
| </ul> |
| <a id="last(java.util.List,int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>last</h4> |
| <pre class="methodSignature">public static <E> java.util.List<E> last​(java.util.List<E> list, |
| int n)</pre> |
| <div class="block">Returns the last <code>n</code> elements of a list.</div> |
| </li> |
| </ul> |
| <a id="skip(java.util.List)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>skip</h4> |
| <pre class="methodSignature">public static <E> java.util.List<E> skip​(java.util.List<E> list)</pre> |
| <div class="block">Returns all but the first element of a list.</div> |
| </li> |
| </ul> |
| <a id="skip(java.util.List,int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>skip</h4> |
| <pre class="methodSignature">public static <E> java.util.List<E> skip​(java.util.List<E> list, |
| int fromIndex)</pre> |
| <div class="block">Returns all but the first <code>n</code> elements of a list.</div> |
| </li> |
| </ul> |
| <a id="range(int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>range</h4> |
| <pre class="methodSignature">public static java.util.List<java.lang.Integer> range​(int end)</pre> |
| </li> |
| </ul> |
| <a id="range(int,int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>range</h4> |
| <pre class="methodSignature">public static java.util.List<java.lang.Integer> range​(int start, |
| int end)</pre> |
| </li> |
| </ul> |
| <a id="isDistinct(java.util.List)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isDistinct</h4> |
| <pre class="methodSignature">public static <E> boolean isDistinct​(java.util.List<E> list)</pre> |
| <div class="block">Returns whether the elements of <code>list</code> are distinct.</div> |
| </li> |
| </ul> |
| <a id="firstDuplicate(java.util.List)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>firstDuplicate</h4> |
| <pre class="methodSignature">public static <E> int firstDuplicate​(java.util.List<E> list)</pre> |
| <div class="block">Returns the ordinal of the first element in the list which is equal to a |
| previous element in the list. |
| |
| <p>For example, |
| <code>firstDuplicate(Arrays.asList("a", "b", "c", "b", "a"))</code> |
| returns 3, the ordinal of the 2nd "b".</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>list</code> - List</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Ordinal of first duplicate, or -1 if not found</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="distinctList(java.util.List)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>distinctList</h4> |
| <pre class="methodSignature">public static <E> java.util.List<E> distinctList​(java.util.List<E> list)</pre> |
| <div class="block">Converts a list into a list with unique elements. |
| |
| <p>The order is preserved; the second and subsequent occurrences are |
| removed. |
| |
| <p>If the list is already unique it is returned unchanged.</div> |
| </li> |
| </ul> |
| <a id="distinctList(java.lang.Iterable)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>distinctList</h4> |
| <pre class="methodSignature">public static <E> java.util.List<E> distinctList​(java.lang.Iterable<E> keys)</pre> |
| <div class="block">Converts an iterable into a list with unique elements. |
| |
| <p>The order is preserved; the second and subsequent occurrences are |
| removed. |
| |
| <p>If <code>iterable</code> is a unique list it is returned unchanged.</div> |
| </li> |
| </ul> |
| <a id="intersects(java.util.Collection,java.util.Collection)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>intersects</h4> |
| <pre class="methodSignature">public static <E> boolean intersects​(java.util.Collection<E> c0, |
| java.util.Collection<E> c1)</pre> |
| <div class="block">Returns whether two collections have any elements in common.</div> |
| </li> |
| </ul> |
| <a id="findMatch(java.util.List,java.lang.String,boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>findMatch</h4> |
| <pre class="methodSignature">public static int findMatch​(java.util.List<java.lang.String> strings, |
| java.lang.String seek, |
| boolean caseSensitive)</pre> |
| <div class="block">Looks for a string within a list of strings, using a given |
| case-sensitivity policy, and returns the position at which the first match |
| is found, or -1 if there are no matches.</div> |
| </li> |
| </ul> |
| <a id="matches(boolean,java.lang.String,java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>matches</h4> |
| <pre class="methodSignature">public static boolean matches​(boolean caseSensitive, |
| java.lang.String s0, |
| java.lang.String s1)</pre> |
| <div class="block">Returns whether a name matches another according to a given |
| case-sensitivity policy.</div> |
| </li> |
| </ul> |
| <a id="startsWith(java.util.List,java.util.List)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>startsWith</h4> |
| <pre class="methodSignature">public static <E> boolean startsWith​(java.util.List<E> list0, |
| java.util.List<E> list1)</pre> |
| <div class="block">Returns whether one list is a prefix of another.</div> |
| </li> |
| </ul> |
| <a id="listToString(java.util.List)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>listToString</h4> |
| <pre class="methodSignature">public static java.lang.String listToString​(java.util.List<java.lang.String> list)</pre> |
| <div class="block">Converts ["ab", "c"] to "ab"."c".</div> |
| </li> |
| </ul> |
| <a id="stringToList(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>stringToList</h4> |
| <pre class="methodSignature">public static java.util.List<java.lang.String> stringToList​(java.lang.String s)</pre> |
| </li> |
| </ul> |
| <a id="human(double)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>human</h4> |
| <pre class="methodSignature">public static java.lang.String human​(double d)</pre> |
| <div class="block">Converts a number into human-readable form, with 3 digits and a "K", "M" |
| or "G" multiplier for thousands, millions or billions. |
| |
| <p>Examples: -2, 0, 1, 999, 1.00K, 1.99K, 3.45M, 4.56B.</p></div> |
| </li> |
| </ul> |
| <a id="digits3(long,int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>digits3</h4> |
| <pre class="methodSignature">private static java.lang.String digits3​(long x, |
| int z)</pre> |
| </li> |
| </ul> |
| <a id="asIndexMapJ(java.util.Collection,java.util.function.Function)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>asIndexMapJ</h4> |
| <pre class="methodSignature">public static <K,​V> java.util.Map<K,​V> asIndexMapJ​(java.util.Collection<V> values, |
| java.util.function.Function<V,​K> function)</pre> |
| <div class="block">Returns a map that is a view onto a collection of values, using the |
| provided function to convert a value to a key. |
| |
| <p>Unlike |
| <code>Maps.uniqueIndex(Iterable, com.google.common.base.Function)</code>, |
| returns a view whose contents change as the collection of values changes.</div> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>K</code> - Key type</dd> |
| <dd><code>V</code> - Value type</dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>values</code> - Collection of values</dd> |
| <dd><code>function</code> - Function to map value to key</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Map that is a view onto the values</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="asIndexMap(java.util.Collection,com.google.common.base.Function)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>asIndexMap</h4> |
| <pre class="methodSignature">@Deprecated |
| public static <K,​V> java.util.Map<K,​V> asIndexMap​(java.util.Collection<V> values, |
| com.google.common.base.Function<V,​K> function)</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> |
| </li> |
| </ul> |
| <a id="debugCode(java.io.PrintStream,java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>debugCode</h4> |
| <pre class="methodSignature">public static void debugCode​(java.io.PrintStream out, |
| java.lang.String code)</pre> |
| <div class="block">Prints the given code with line numbering.</div> |
| </li> |
| </ul> |
| <a id="immutableCopy(java.lang.Iterable)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>immutableCopy</h4> |
| <pre class="methodSignature">public static <E> java.util.List<java.util.List<E>> immutableCopy​(java.lang.Iterable<? extends java.lang.Iterable<E>> lists)</pre> |
| <div class="block">Returns a copy of a list of lists, making the component lists immutable if |
| they are not already.</div> |
| </li> |
| </ul> |
| <a id="printWriter(java.io.OutputStream)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>printWriter</h4> |
| <pre class="methodSignature">public static java.io.PrintWriter printWriter​(java.io.OutputStream out)</pre> |
| <div class="block">Creates a <code>PrintWriter</code> to a given output stream using UTF-8 |
| character set. |
| |
| <p>Does not use the default character set.</div> |
| </li> |
| </ul> |
| <a id="printWriter(java.io.File)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>printWriter</h4> |
| <pre class="methodSignature">public static java.io.PrintWriter printWriter​(java.io.File file) |
| throws java.io.FileNotFoundException</pre> |
| <div class="block">Creates a <code>PrintWriter</code> to a given file using UTF-8 |
| character set. |
| |
| <p>Does not use the default character set.</div> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.FileNotFoundException</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="reader(java.io.InputStream)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>reader</h4> |
| <pre class="methodSignature">public static java.io.BufferedReader reader​(java.io.InputStream in)</pre> |
| <div class="block">Creates a <code>BufferedReader</code> to a given input stream using UTF-8 |
| character set. |
| |
| <p>Does not use the default character set.</div> |
| </li> |
| </ul> |
| <a id="reader(java.io.File)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>reader</h4> |
| <pre class="methodSignature">public static java.io.BufferedReader reader​(java.io.File file) |
| throws java.io.FileNotFoundException</pre> |
| <div class="block">Creates a <code>BufferedReader</code> to read a given file using UTF-8 |
| character set. |
| |
| <p>Does not use the default character set.</div> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.FileNotFoundException</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="calendar()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>calendar</h4> |
| <pre class="methodSignature">public static java.util.Calendar calendar()</pre> |
| <div class="block">Creates a <code>Calendar</code> in the UTC time zone and root locale. |
| Does not use the time zone or locale.</div> |
| </li> |
| </ul> |
| <a id="calendar(long)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>calendar</h4> |
| <pre class="methodSignature">public static java.util.Calendar calendar​(long millis)</pre> |
| <div class="block">Creates a <code>Calendar</code> in the UTC time zone and root locale |
| with a given time.</div> |
| </li> |
| </ul> |
| <a id="toImmutableList()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toImmutableList</h4> |
| <pre class="methodSignature">public static <T> java.util.stream.Collector<T,​com.google.common.collect.ImmutableList.Builder<T>,​com.google.common.collect.ImmutableList<T>> toImmutableList()</pre> |
| <div class="block">Returns a <code>Collector</code> that accumulates the input elements into a |
| Guava <code>ImmutableList</code> via a <code>ImmutableList.Builder</code>. |
| |
| <p>It will be obsolete when we move to <a href="Bug.html#upgrade(java.lang.String)"><code>Guava 21.0</code></a>, |
| which has <code>ImmutableList.toImmutableList()</code>.</div> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>T</code> - Type of the input elements</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a <code>Collector</code> that collects all the input elements into an |
| <code>ImmutableList</code>, in encounter order</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="transform(java.util.List,java.util.function.Function)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>transform</h4> |
| <pre class="methodSignature">public static <F,​T> java.util.List<T> transform​(java.util.List<F> list, |
| java.util.function.Function<F,​T> function)</pre> |
| <div class="block">Transforms a list, applying a function to each element.</div> |
| </li> |
| </ul> |
| <a id="filter(java.lang.Iterable,java.util.function.Predicate)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>filter</h4> |
| <pre class="methodSignature">public static <E> java.lang.Iterable<E> filter​(java.lang.Iterable<E> iterable, |
| java.util.function.Predicate<E> predicate)</pre> |
| <div class="block">Filters an iterable.</div> |
| </li> |
| </ul> |
| <a id="filter(java.util.Iterator,java.util.function.Predicate)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>filter</h4> |
| <pre class="methodSignature">public static <E> java.util.Iterator<E> filter​(java.util.Iterator<E> iterator, |
| java.util.function.Predicate<E> predicate)</pre> |
| <div class="block">Filters an iterator.</div> |
| </li> |
| </ul> |
| <a id="select(java.util.List,java.util.List)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>select</h4> |
| <pre class="methodSignature">public static <E> java.util.List<E> select​(java.util.List<E> list, |
| java.util.List<java.lang.Integer> ordinals)</pre> |
| <div class="block">Returns a view of a list, picking the elements of a list with the given |
| set of ordinals.</div> |
| </li> |
| </ul> |
| <a id="blackholeMap()"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>blackholeMap</h4> |
| <pre class="methodSignature">public static <K,​V> java.util.Map<K,​V> blackholeMap()</pre> |
| <div class="block">Returns a map which ignores any write operation.</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| </div> |
| </main> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <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="class-use/Util.html">Use</a></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> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../allclasses.html">All Classes</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> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li><a href="#nested.class.summary">Nested</a> | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a id="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </nav> |
| <p class="legalCopy"><small>Copyright © 2012–2019 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </footer> |
| </body> |
| </html> |