| <!DOCTYPE HTML> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (11.0.4) on Fri Sep 20 12:10:30 CEST 2019 --> |
| <title>ObjectConverters (Apache SIS 1.0 API)</title> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <meta name="dc.created" content="2019-09-20"> |
| <meta name="keywords" content="org.apache.sis.util.ObjectConverters class"> |
| <meta name="keywords" content="identity()"> |
| <meta name="keywords" content="find()"> |
| <meta name="keywords" content="convert()"> |
| <meta name="keywords" content="derivedSet()"> |
| <meta name="keywords" content="derivedMap()"> |
| <meta name="keywords" content="derivedKeys()"> |
| <meta name="keywords" content="derivedValues()"> |
| <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../sis.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="ObjectConverters (Apache SIS 1.0 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var data = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| var pathtoroot = "../../../../"; |
| var useModuleDirectories = false; |
| 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/ObjectConverters.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>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </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.sis.util</a></div> |
| <h2 title="Class ObjectConverters" class="title">Class ObjectConverters</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li><a href="Static.html" title="class in org.apache.sis.util">Static</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>ObjectConverters</li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <pre>public final class <span class="typeNameLabel">ObjectConverters</span> |
| extends <a href="Static.html" title="class in org.apache.sis.util">Static</a></pre> |
| <div class="block">Static methods for creating <a href="ObjectConverter.html" title="interface in org.apache.sis.util"><code>ObjectConverter</code></a> instances or collection views based on converters. |
| Converters are created by the following methods: |
| |
| <ul> |
| <li><a href="#identity(java.lang.Class)"><code>identity(Class)</code></a></li> |
| <li><a href="#find(java.lang.Class,java.lang.Class)"><code>find(Class, Class)</code></a></li> |
| </ul> |
| |
| Converters can be used for creating derived collections by the following methods: |
| |
| <ul> |
| <li><a href="#derivedSet(java.util.Set,org.apache.sis.util.ObjectConverter)"><code>derivedSet(Set, ObjectConverter)</code></a></li> |
| <li><a href="#derivedMap(java.util.Map,org.apache.sis.util.ObjectConverter,org.apache.sis.util.ObjectConverter)"><code>derivedMap(Map, ObjectConverter, ObjectConverter)</code></a></li> |
| <li><a href="#derivedKeys(java.util.Map,org.apache.sis.util.ObjectConverter,java.lang.Class)"><code>derivedKeys(Map, ObjectConverter, Class)</code></a></li> |
| <li><a href="#derivedValues(java.util.Map,java.lang.Class,org.apache.sis.util.ObjectConverter)"><code>derivedValues(Map, Class, ObjectConverter)</code></a></li> |
| </ul> |
| |
| <div class="note"><b>Example:</b> |
| the following code converts instances in a collection from type <code>S</code> to type <code>T</code>, |
| where the types are unknown at compile-time. Note that the converter is obtained only once |
| before to be applied to every elements in the loop. |
| |
| <blockquote><pre>Class<S> sourceType = ... |
| Class<T> targetType = ... |
| Collection<S> sources = ...; |
| Collection<T> targets = ...; |
| ObjectConverter<S,T> converter = ObjectConverters.<b>find</b>(sourceType, targetType); |
| <font color="green">for</font> (S source : sources) { |
| targets.<b>add</b>(converter.<b>apply</b>(source)); |
| }</pre></blockquote> |
| </div></div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>0.3</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="ObjectConverter.html" title="interface in org.apache.sis.util"><code>ObjectConverter</code></a></dd> |
| |
| <p><font size="-1">Defined in the <code>sis-utility</code> module</font></p> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========== 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></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>static <T> T</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#convert(java.lang.Object,java.lang.Class)">convert</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a> value, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><T> target)</code></th> |
| <td class="colLast"> |
| <div class="block">Converts the given value to the given type.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>static <SK,​K,​V><br><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink">Map</a><K,​V></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#derivedKeys(java.util.Map,org.apache.sis.util.ObjectConverter,java.lang.Class)">derivedKeys</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink">Map</a><SK,​V> storage, |
| <a href="ObjectConverter.html" title="interface in org.apache.sis.util">ObjectConverter</a><SK,​K> keyConverter, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><V> valueType)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a map whose keys are derived <cite>on-the-fly</cite> from the given map.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>static <SK,​SV,​K,​V><br><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink">Map</a><K,​V></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#derivedMap(java.util.Map,org.apache.sis.util.ObjectConverter,org.apache.sis.util.ObjectConverter)">derivedMap</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink">Map</a><SK,​SV> storage, |
| <a href="ObjectConverter.html" title="interface in org.apache.sis.util">ObjectConverter</a><SK,​K> keyConverter, |
| <a href="ObjectConverter.html" title="interface in org.apache.sis.util">ObjectConverter</a><SV,​V> valueConverter)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a map whose keys and values are derived <cite>on-the-fly</cite> from the given map.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>static <S,​E><br><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util" class="externalLink">Set</a><E></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#derivedSet(java.util.Set,org.apache.sis.util.ObjectConverter)">derivedSet</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util" class="externalLink">Set</a><S> storage, |
| <a href="ObjectConverter.html" title="interface in org.apache.sis.util">ObjectConverter</a><S,​E> converter)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a set whose elements are derived <cite>on-the-fly</cite> from the given set.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>static <K,​SV,​V><br><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink">Map</a><K,​V></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#derivedValues(java.util.Map,java.lang.Class,org.apache.sis.util.ObjectConverter)">derivedValues</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink">Map</a><K,​SV> storage, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><K> keyType, |
| <a href="ObjectConverter.html" title="interface in org.apache.sis.util">ObjectConverter</a><SV,​V> valueConverter)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a map whose values are derived <cite>on-the-fly</cite> from the given map.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>static <S,​T><br><a href="ObjectConverter.html" title="interface in org.apache.sis.util">ObjectConverter</a><? super S,​? extends T></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#find(java.lang.Class,java.lang.Class)">find</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><S> source, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><T> target)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a converter for the specified source and target classes.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>static <T> <a href="ObjectConverter.html" title="interface in org.apache.sis.util">ObjectConverter</a><T,​T></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#identity(java.lang.Class)">identity</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><T> type)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns an identity converter for objects of the given type.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a id="methods.inherited.from.class.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></h3> |
| <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink">wait</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a id="identity(java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>identity</h4> |
| <pre class="methodSignature">public static <T> <a href="ObjectConverter.html" title="interface in org.apache.sis.util">ObjectConverter</a><T,​T> identity​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><T> type)</pre> |
| <div class="block">Returns an identity converter for objects of the given type.</div> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>T</code> - the object type.</dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>type</code> - the object type.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>an identity converter for objects of the given type.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="find(java.lang.Class,java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>find</h4> |
| <pre class="methodSignature">public static <S,​T> <a href="ObjectConverter.html" title="interface in org.apache.sis.util">ObjectConverter</a><? super S,​? extends T> find​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><S> source, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><T> target) |
| throws <a href="UnconvertibleObjectException.html" title="class in org.apache.sis.util">UnconvertibleObjectException</a></pre> |
| <div class="block">Returns a converter for the specified source and target classes.</div> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>S</code> - the source class.</dd> |
| <dd><code>T</code> - the target class.</dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>source</code> - the source class.</dd> |
| <dd><code>target</code> - the target class, or <code>Object.class</code> for any.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the converter from the specified source class to the target class.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="UnconvertibleObjectException.html" title="class in org.apache.sis.util">UnconvertibleObjectException</a></code> - if no converter is found.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="convert(java.lang.Object,java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>convert</h4> |
| <pre class="methodSignature">public static <T> T convert​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a> value, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><T> target) |
| throws <a href="UnconvertibleObjectException.html" title="class in org.apache.sis.util">UnconvertibleObjectException</a></pre> |
| <div class="block">Converts the given value to the given type. This convenience method shall be used only for |
| rare conversions. For converting many instances between the same source and target classes, |
| consider invoking <a href="#find(java.lang.Class,java.lang.Class)"><code>find(Class, Class)</code></a> instead in order to reuse the same converter |
| for all values to convert.</div> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>T</code> - the type of the <code>target</code> class.</dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - the value to convert, or <code>null</code>.</dd> |
| <dd><code>target</code> - the target class.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the converted value (may be <code>null</code>).</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="UnconvertibleObjectException.html" title="class in org.apache.sis.util">UnconvertibleObjectException</a></code> - if the given value can not be converted.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="derivedSet(java.util.Set,org.apache.sis.util.ObjectConverter)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>derivedSet</h4> |
| <pre class="methodSignature">public static <S,​E> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util" class="externalLink">Set</a><E> derivedSet​(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util" class="externalLink">Set</a><S> storage, |
| <a href="ObjectConverter.html" title="interface in org.apache.sis.util">ObjectConverter</a><S,​E> converter)</pre> |
| <div class="block">Returns a set whose elements are derived <cite>on-the-fly</cite> from the given set. |
| Conversions from the original elements to the derived elements are performed when needed |
| by invoking the <a href="ObjectConverter.html#apply(S)"><code>ObjectConverter.apply(Object)</code></a> method on the given converter. |
| |
| <p>This convenience method delegates to |
| <a href="collection/Containers.html#derivedSet(java.util.Set,org.apache.sis.util.ObjectConverter)"><code>Containers.derivedSet(…)</code></a>. |
| See the javadoc of the above method for more information.</div> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>S</code> - the type of elements in the storage (original) set.</dd> |
| <dd><code>E</code> - the type of elements in the derived set.</dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>storage</code> - the storage set containing the original elements, or <code>null</code>.</dd> |
| <dd><code>converter</code> - the converter from the elements in the storage set to the elements in the derived set.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a view over the <code>storage</code> set containing all elements converted by the given converter, or |
| <code>null</code> if <code>storage</code> was null.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="collection/Containers.html#derivedSet(java.util.Set,org.apache.sis.util.ObjectConverter)"><code>Containers.derivedSet(Set, ObjectConverter)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="derivedMap(java.util.Map,org.apache.sis.util.ObjectConverter,org.apache.sis.util.ObjectConverter)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>derivedMap</h4> |
| <pre class="methodSignature">public static <SK,​SV,​K,​V> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink">Map</a><K,​V> derivedMap​(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink">Map</a><SK,​SV> storage, |
| <a href="ObjectConverter.html" title="interface in org.apache.sis.util">ObjectConverter</a><SK,​K> keyConverter, |
| <a href="ObjectConverter.html" title="interface in org.apache.sis.util">ObjectConverter</a><SV,​V> valueConverter)</pre> |
| <div class="block">Returns a map whose keys and values are derived <cite>on-the-fly</cite> from the given map. |
| Conversions from the original entries to the derived entries are performed when needed |
| by invoking the <a href="ObjectConverter.html#apply(S)"><code>ObjectConverter.apply(Object)</code></a> method on the given converters. |
| |
| <p>This convenience method delegates to |
| <a href="collection/Containers.html#derivedMap(java.util.Map,org.apache.sis.util.ObjectConverter,org.apache.sis.util.ObjectConverter)"><code>Containers.derivedMap(…)</code></a>. |
| See the javadoc of the above method for more information.</div> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>SK</code> - the type of keys in the storage map.</dd> |
| <dd><code>SV</code> - the type of values in the storage map.</dd> |
| <dd><code>K</code> - the type of keys in the derived map.</dd> |
| <dd><code>V</code> - the type of values in the derived map.</dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>storage</code> - the storage map containing the original entries, or <code>null</code>.</dd> |
| <dd><code>keyConverter</code> - the converter from the keys in the storage map to the keys in the derived map.</dd> |
| <dd><code>valueConverter</code> - the converter from the values in the storage map to the values in the derived map.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a view over the <code>storage</code> map containing all entries converted by the given converters, or |
| <code>null</code> if <code>storage</code> was null.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="collection/Containers.html#derivedMap(java.util.Map,org.apache.sis.util.ObjectConverter,org.apache.sis.util.ObjectConverter)"><code>Containers.derivedMap(Map, ObjectConverter, ObjectConverter)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="derivedKeys(java.util.Map,org.apache.sis.util.ObjectConverter,java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>derivedKeys</h4> |
| <pre class="methodSignature">public static <SK,​K,​V> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink">Map</a><K,​V> derivedKeys​(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink">Map</a><SK,​V> storage, |
| <a href="ObjectConverter.html" title="interface in org.apache.sis.util">ObjectConverter</a><SK,​K> keyConverter, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><V> valueType)</pre> |
| <div class="block">Returns a map whose keys are derived <cite>on-the-fly</cite> from the given map. |
| Conversions from the original keys to the derived keys are performed when needed by |
| invoking the <a href="ObjectConverter.html#apply(S)"><code>ObjectConverter.apply(Object)</code></a> method on the given converter. |
| |
| <p>This convenience method delegates to |
| <a href="collection/Containers.html#derivedMap(java.util.Map,org.apache.sis.util.ObjectConverter,org.apache.sis.util.ObjectConverter)"><code>Containers.derivedMap(…)</code></a>. |
| See the javadoc of the above method for more information.</div> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>SK</code> - the type of keys in the storage map.</dd> |
| <dd><code>K</code> - the type of keys in the derived map.</dd> |
| <dd><code>V</code> - the type of values in the storage and derived map.</dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>storage</code> - the storage map containing the original entries, or <code>null</code>.</dd> |
| <dd><code>keyConverter</code> - the converter from the keys in the storage map to the keys in the derived map.</dd> |
| <dd><code>valueType</code> - the type of values in the storage and derived map.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a view over the <code>storage</code> map containing all entries with the keys converted |
| by the given converter, or <code>null</code> if <code>storage</code> was null.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="collection/Containers.html#derivedMap(java.util.Map,org.apache.sis.util.ObjectConverter,org.apache.sis.util.ObjectConverter)"><code>Containers.derivedMap(Map, ObjectConverter, ObjectConverter)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="derivedValues(java.util.Map,java.lang.Class,org.apache.sis.util.ObjectConverter)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>derivedValues</h4> |
| <pre class="methodSignature">public static <K,​SV,​V> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink">Map</a><K,​V> derivedValues​(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink">Map</a><K,​SV> storage, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><K> keyType, |
| <a href="ObjectConverter.html" title="interface in org.apache.sis.util">ObjectConverter</a><SV,​V> valueConverter)</pre> |
| <div class="block">Returns a map whose values are derived <cite>on-the-fly</cite> from the given map. |
| Conversions from the original values to the derived values are performed when needed by |
| invoking the <a href="ObjectConverter.html#apply(S)"><code>ObjectConverter.apply(Object)</code></a> method on the given converter. |
| |
| <p>This convenience method delegates to |
| <a href="collection/Containers.html#derivedMap(java.util.Map,org.apache.sis.util.ObjectConverter,org.apache.sis.util.ObjectConverter)"><code>Containers.derivedMap(…)</code></a>. |
| See the javadoc of the above method for more information.</div> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>K</code> - the type of keys in the storage and derived map.</dd> |
| <dd><code>SV</code> - the type of values in the storage map.</dd> |
| <dd><code>V</code> - the type of values in the derived map.</dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>storage</code> - the storage map containing the original entries, or <code>null</code>.</dd> |
| <dd><code>keyType</code> - the type of keys in the storage and derived map.</dd> |
| <dd><code>valueConverter</code> - the converter from the values in the storage map to the values in the derived map.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a view over the <code>storage</code> map containing all entries with the values converted by the given |
| converter, or <code>null</code> if <code>storage</code> was null.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="collection/Containers.html#derivedMap(java.util.Map,org.apache.sis.util.ObjectConverter,org.apache.sis.util.ObjectConverter)"><code>Containers.derivedMap(Map, ObjectConverter, ObjectConverter)</code></a></dd> |
| </dl> |
| </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/ObjectConverters.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>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </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 © 2010–2019 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </footer> |
| </body> |
| </html> |