blob: 1f4c1adfabb1f7cf45845f74a715a6186202df6b [file] [log] [blame]
<!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&nbsp;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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</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>&nbsp;<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>Object­Converter</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>derived­Set(Set, Object­Converter)</code></a></li>
<li><a href="#derivedMap(java.util.Map,org.apache.sis.util.ObjectConverter,org.apache.sis.util.ObjectConverter)"><code>derived­Map(Map, Object­Converter, Object­Converter)</code></a></li>
<li><a href="#derivedKeys(java.util.Map,org.apache.sis.util.ObjectConverter,java.lang.Class)"><code>derived­Keys(Map, Object­Converter, Class)</code></a></li>
<li><a href="#derivedValues(java.util.Map,java.lang.Class,org.apache.sis.util.ObjectConverter)"><code>derived­Values(Map, Class, Object­Converter)</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&lt;S&gt; sourceType = ...
Class&lt;T&gt; targetType = ...
Collection&lt;S&gt; sources = ...;
Collection&lt;T&gt; targets = ...;
ObjectConverter&lt;S,T&gt; 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>Object­Converter</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">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</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 &lt;T&gt;&nbsp;T</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#convert(java.lang.Object,java.lang.Class)">convert</a></span>&#8203;(<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>&nbsp;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>&lt;T&gt;&nbsp;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 &lt;SK,&#8203;K,&#8203;V&gt;<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>&lt;K,&#8203;V&gt;</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>&#8203;(<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>&lt;SK,&#8203;V&gt;&nbsp;storage,
<a href="ObjectConverter.html" title="interface in org.apache.sis.util">ObjectConverter</a>&lt;SK,&#8203;K&gt;&nbsp;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>&lt;V&gt;&nbsp;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 &lt;SK,&#8203;SV,&#8203;K,&#8203;V&gt;<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>&lt;K,&#8203;V&gt;</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>&#8203;(<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>&lt;SK,&#8203;SV&gt;&nbsp;storage,
<a href="ObjectConverter.html" title="interface in org.apache.sis.util">ObjectConverter</a>&lt;SK,&#8203;K&gt;&nbsp;keyConverter,
<a href="ObjectConverter.html" title="interface in org.apache.sis.util">ObjectConverter</a>&lt;SV,&#8203;V&gt;&nbsp;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 &lt;S,&#8203;E&gt;<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>&lt;E&gt;</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>&#8203;(<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>&lt;S&gt;&nbsp;storage,
<a href="ObjectConverter.html" title="interface in org.apache.sis.util">ObjectConverter</a>&lt;S,&#8203;E&gt;&nbsp;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 &lt;K,&#8203;SV,&#8203;V&gt;<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>&lt;K,&#8203;V&gt;</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>&#8203;(<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>&lt;K,&#8203;SV&gt;&nbsp;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>&lt;K&gt;&nbsp;keyType,
<a href="ObjectConverter.html" title="interface in org.apache.sis.util">ObjectConverter</a>&lt;SV,&#8203;V&gt;&nbsp;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 &lt;S,&#8203;T&gt;<br><a href="ObjectConverter.html" title="interface in org.apache.sis.util">ObjectConverter</a>&lt;? super S,&#8203;? extends T&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#find(java.lang.Class,java.lang.Class)">find</a></span>&#8203;(<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>&lt;S&gt;&nbsp;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>&lt;T&gt;&nbsp;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 &lt;T&gt;&nbsp;<a href="ObjectConverter.html" title="interface in org.apache.sis.util">ObjectConverter</a>&lt;T,&#8203;T&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#identity(java.lang.Class)">identity</a></span>&#8203;(<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>&lt;T&gt;&nbsp;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&nbsp;<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">get­Class</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">hash­Code</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">notify­All</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">to­String</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&nbsp;&lt;T&gt;&nbsp;<a href="ObjectConverter.html" title="interface in org.apache.sis.util">ObjectConverter</a>&lt;T,&#8203;T&gt;&nbsp;identity&#8203;(<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>&lt;T&gt;&nbsp;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&nbsp;&lt;S,&#8203;T&gt;&nbsp;<a href="ObjectConverter.html" title="interface in org.apache.sis.util">ObjectConverter</a>&lt;? super S,&#8203;? extends T&gt;&nbsp;find&#8203;(<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>&lt;S&gt;&nbsp;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>&lt;T&gt;&nbsp;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">Unconvertible­Object­Exception</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&nbsp;&lt;T&gt;&nbsp;T&nbsp;convert&#8203;(<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>&nbsp;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>&lt;T&gt;&nbsp;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">Unconvertible­Object­Exception</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&nbsp;&lt;S,&#8203;E&gt;&nbsp;<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>&lt;E&gt;&nbsp;derivedSet&#8203;(<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>&lt;S&gt;&nbsp;storage,
<a href="ObjectConverter.html" title="interface in org.apache.sis.util">ObjectConverter</a>&lt;S,&#8203;E&gt;&nbsp;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>Object­Converter​.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​.derived­Set(…)</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​.derived­Set(Set, Object­Converter)</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&nbsp;&lt;SK,&#8203;SV,&#8203;K,&#8203;V&gt;&nbsp;<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>&lt;K,&#8203;V&gt;&nbsp;derivedMap&#8203;(<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>&lt;SK,&#8203;SV&gt;&nbsp;storage,
<a href="ObjectConverter.html" title="interface in org.apache.sis.util">ObjectConverter</a>&lt;SK,&#8203;K&gt;&nbsp;keyConverter,
<a href="ObjectConverter.html" title="interface in org.apache.sis.util">ObjectConverter</a>&lt;SV,&#8203;V&gt;&nbsp;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>Object­Converter​.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​.derived­Map(…)</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>key­Converter</code> - the converter from the keys in the storage map to the keys in the derived map.</dd>
<dd><code>value­Converter</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​.derived­Map(Map, Object­Converter, Object­Converter)</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&nbsp;&lt;SK,&#8203;K,&#8203;V&gt;&nbsp;<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>&lt;K,&#8203;V&gt;&nbsp;derivedKeys&#8203;(<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>&lt;SK,&#8203;V&gt;&nbsp;storage,
<a href="ObjectConverter.html" title="interface in org.apache.sis.util">ObjectConverter</a>&lt;SK,&#8203;K&gt;&nbsp;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>&lt;V&gt;&nbsp;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>Object­Converter​.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​.derived­Map(…)</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>key­Converter</code> - the converter from the keys in the storage map to the keys in the derived map.</dd>
<dd><code>value­Type</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​.derived­Map(Map, Object­Converter, Object­Converter)</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&nbsp;&lt;K,&#8203;SV,&#8203;V&gt;&nbsp;<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>&lt;K,&#8203;V&gt;&nbsp;derivedValues&#8203;(<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>&lt;K,&#8203;SV&gt;&nbsp;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>&lt;K&gt;&nbsp;keyType,
<a href="ObjectConverter.html" title="interface in org.apache.sis.util">ObjectConverter</a>&lt;SV,&#8203;V&gt;&nbsp;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>Object­Converter​.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​.derived­Map(…)</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>key­Type</code> - the type of keys in the storage and derived map.</dd>
<dd><code>value­Converter</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​.derived­Map(Map, Object­Converter, Object­Converter)</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&nbsp;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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
<p class="legalCopy"><small>Copyright &#169; 2010&#x2013;2019 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</body>
</html>