| <!DOCTYPE HTML> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (11.0.4) on Fri Sep 20 12:10:30 CEST 2019 --> |
| <title>ComparisonMode (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.ComparisonMode class"> |
| <meta name="keywords" content="APPROXIMATIVE"> |
| <meta name="keywords" content="values()"> |
| <meta name="keywords" content="valueOf()"> |
| <meta name="keywords" content="isIgnoringMetadata()"> |
| <meta name="keywords" content="isApproximate()"> |
| <meta name="keywords" content="isApproximative()"> |
| <meta name="keywords" content="equalityLevel()"> |
| <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="ComparisonMode (Apache SIS 1.0 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var data = {"i0":9,"i1":10,"i2":42,"i3":10,"i4":9,"i5":9}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance 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 = 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/ComparisonMode.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><a href="#enum.constant.summary">Enum Constants</a> | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#enum.constant.detail">Enum Constants</a> | </li> |
| <li><a href="#field.detail">Field</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.sis.util</a></div> |
| <h2 title="Enum ComparisonMode" class="title">Enum ComparisonMode</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="https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang" class="externalLink">Enum</a><<a href="ComparisonMode.html" title="enum in org.apache.sis.util">ComparisonMode</a>></li> |
| <li> |
| <ul class="inheritance"> |
| <li>ComparisonMode</li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Implemented Interfaces:</dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">Serializable</a></code>, <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Comparable</a><<a href="ComparisonMode.html" title="enum in org.apache.sis.util">ComparisonMode</a>></code></dd> |
| </dl> |
| <hr> |
| <pre>public enum <span class="typeNameLabel">ComparisonMode</span> |
| extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang" class="externalLink">Enum</a><<a href="ComparisonMode.html" title="enum in org.apache.sis.util">ComparisonMode</a>></pre> |
| <div class="block">Specifies the level of strictness when comparing two <a href="LenientComparable.html" title="interface in org.apache.sis.util"><code>LenientComparable</code></a> objects |
| for equality. This enumeration allows users to specify which kind of differences can be |
| tolerated between two objects: differences in implementation class, differences in |
| some kinds of property, or slight difference in numerical values. |
| |
| <p>This enumeration is <em>ordered</em> from stricter to more lenient levels:</p> |
| |
| <ol> |
| <li><a href="#STRICT"><code>STRICT</code></a> – All attributes of the compared objects shall be strictly equal.</li> |
| <li><a href="#BY_CONTRACT"><code>BY_CONTRACT</code></a> – Only the attributes published in the interface contract need to be compared.</li> |
| <li><a href="#IGNORE_METADATA"><code>IGNORE_METADATA</code></a> – Only the attributes relevant to the object functionality are compared.</li> |
| <li><a href="#APPROXIMATE"><code>APPROXIMATE</code></a> – Only the attributes relevant to the object functionality are compared, |
| with some tolerance threshold on numerical values.</li> |
| <li><a href="#ALLOW_VARIANT"><code>ALLOW_VARIANT</code></a> – For objects not really equal but related (e.g. CRS using different axis order).</li> |
| <li><a href="#DEBUG"><code>DEBUG</code></a> – Special mode for figuring out why two objects expected to be equal are not.</li> |
| </ol> |
| |
| If two objects are equal at some level of strictness <var>E</var>, then they should also |
| be equal at all levels listed below <var>E</var> in the above list. For example if two objects |
| are equal at the <a href="#BY_CONTRACT"><code>BY_CONTRACT</code></a> level, then they should also be equal at the |
| <a href="#IGNORE_METADATA"><code>IGNORE_METADATA</code></a> level but not necessarily at the <a href="#STRICT"><code>STRICT</code></a> level.</div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>0.3</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="LenientComparable.html#equals(java.lang.Object,org.apache.sis.util.ComparisonMode)"><code>LenientComparable.equals(Object, ComparisonMode)</code></a>, |
| <a href="Utilities.html#deepEquals(java.lang.Object,java.lang.Object,org.apache.sis.util.ComparisonMode)"><code>Utilities.deepEquals(Object, Object, ComparisonMode)</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"> |
| <!-- =========== ENUM CONSTANT SUMMARY =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="enum.constant.summary"> |
| <!-- --> |
| </a> |
| <h3>Enum Constant Summary</h3> |
| <table class="memberSummary"> |
| <caption><span>Enum Constants</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Enum Constant</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <th class="colFirst" scope="row"><code><span class="memberNameLink"><a href="#ALLOW_VARIANT">ALLOW_VARIANT</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Most but not all attributes relevant to the object functionality are compared.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <th class="colFirst" scope="row"><code><span class="memberNameLink"><a href="#APPROXIMATE">APPROXIMATE</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Only the attributes relevant to the object functionality are compared, with some tolerance |
| threshold on numerical values.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <th class="colFirst" scope="row"><code><span class="memberNameLink"><a href="#BY_CONTRACT">BY_CONTRACT</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Only the attributes published in some contract (typically a GeoAPI interface) need to be compared.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <th class="colFirst" scope="row"><code><span class="memberNameLink"><a href="#DEBUG">DEBUG</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Same as <a href="#APPROXIMATE"><code>APPROXIMATE</code></a>, except that an <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/AssertionError.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>AssertionError</code></a> is thrown if the two |
| objects are not equal and assertions are enabled.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <th class="colFirst" scope="row"><code><span class="memberNameLink"><a href="#IGNORE_METADATA">IGNORE_METADATA</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Only the attributes relevant to the object functionality are compared.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <th class="colFirst" scope="row"><code><span class="memberNameLink"><a href="#STRICT">STRICT</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">All attributes of the compared objects shall be strictly equal.</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>static <a href="ComparisonMode.html" title="enum in org.apache.sis.util">ComparisonMode</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#APPROXIMATIVE">APPROXIMATIVE</a></span></code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">Renamed <a href="#APPROXIMATE"><code>APPROXIMATE</code></a>.</div> |
| </div> |
| </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="t2" class="tableTab"><span><a href="javascript:show(2);">Instance 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>static <a href="ComparisonMode.html" title="enum in org.apache.sis.util">ComparisonMode</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#equalityLevel(java.lang.Object,java.lang.Object)">equalityLevel</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> o1, |
| <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> o2)</code></th> |
| <td class="colLast"> |
| <div class="block">If the two given objects are equal according one of the modes enumerated in this class, |
| then returns that mode.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isApproximate()">isApproximate</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns <code>true</code> if this comparison uses a tolerance threshold.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isApproximative()">isApproximative</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">Renamed <a href="#isApproximate()"><code>isApproximate()</code></a>.</div> |
| </div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isIgnoringMetadata()">isIgnoringMetadata</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns <code>true</code> if this comparison ignores metadata.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>static <a href="ComparisonMode.html" title="enum in org.apache.sis.util">ComparisonMode</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#valueOf(java.lang.String)">valueOf</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> name)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the enum constant of this type with the specified name.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>static <a href="ComparisonMode.html" title="enum in org.apache.sis.util">ComparisonMode</a>[]</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#values()">values</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns an array containing the constants of this enum type, in |
| the order they are declared.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a id="methods.inherited.from.class.Enum"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang" class="externalLink">Enum</a></h3> |
| <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.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/Enum.html?is-external=true#compareTo(E)" title="class or interface in java.lang" class="externalLink">compareTo</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.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/Enum.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/Enum.html?is-external=true#getDeclaringClass()" title="class or interface in java.lang" class="externalLink">getDeclaringClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.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/Enum.html?is-external=true#name()" title="class or interface in java.lang" class="externalLink">name</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html?is-external=true#ordinal()" title="class or interface in java.lang" class="externalLink">ordinal</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.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/Enum.html?is-external=true#valueOf(java.lang.Class,java.lang.String)" title="class or interface in java.lang" class="externalLink">valueOf</a></code></li> |
| </ul> |
| <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#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#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#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"> |
| <!-- ============ ENUM CONSTANT DETAIL =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="enum.constant.detail"> |
| <!-- --> |
| </a> |
| <h3>Enum Constant Detail</h3> |
| <a id="STRICT"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>STRICT</h4> |
| <pre>public static final <a href="ComparisonMode.html" title="enum in org.apache.sis.util">ComparisonMode</a> STRICT</pre> |
| <div class="block">All attributes of the compared objects shall be strictly equal. This comparison mode |
| is equivalent to the <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"><code>Object.equals(Object)</code></a> method, and must be compliant with |
| the contract documented in that method. In particular, this comparison mode shall be |
| consistent with <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"><code>Object.hashCode()</code></a> and be symmetric (<code>A.equals(B)</code> implies |
| <code>B.equals(A)</code>). |
| |
| <div class="section">Implementation note</div> |
| In the SIS implementation, this comparison mode usually have the following |
| characteristics (not always, this is only typical): |
| |
| <ul> |
| <li>The objects being compared need to be the same implementation class.</li> |
| <li>Private fields are compared directly instead than invoking public getter methods.</li> |
| </ul></div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><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"><code>Object.equals(Object)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="BY_CONTRACT"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>BY_CONTRACT</h4> |
| <pre>public static final <a href="ComparisonMode.html" title="enum in org.apache.sis.util">ComparisonMode</a> BY_CONTRACT</pre> |
| <div class="block">Only the attributes published in some contract (typically a GeoAPI interface) need to be compared. |
| The implementation classes do not need to be the same and some private attributes may be ignored. |
| |
| <p>Note that this comparison mode does <strong>not</strong> guaranteed <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"><code>Object.hashCode()</code></a> |
| consistency, neither comparison symmetry (i.e. <code>A.equals(B)</code> and <code>B.equals(A)</code> may |
| return different results if the <code>equals</code> methods are implemented differently).</p> |
| |
| <div class="section">Implementation note</div> |
| In the SIS implementation, this comparison mode usually have the following |
| characteristics (not always, this is only typical): |
| |
| <ul> |
| <li>The objects being compared need to implement the same GeoAPI interfaces.</li> |
| <li>Public getter methods are used (no direct access to private fields).</li> |
| </ul></div> |
| </li> |
| </ul> |
| <a id="IGNORE_METADATA"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>IGNORE_METADATA</h4> |
| <pre>public static final <a href="ComparisonMode.html" title="enum in org.apache.sis.util">ComparisonMode</a> IGNORE_METADATA</pre> |
| <div class="block">Only the attributes relevant to the object functionality are compared. Attributes that |
| are only informative can be ignored. This comparison mode is typically less strict than |
| <a href="#BY_CONTRACT"><code>BY_CONTRACT</code></a>. |
| |
| <div class="section">Application to coordinate reference systems</div> |
| If the objects being compared are <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/crs/CoordinateReferenceSystem.html?is-external=true" title="class or interface in org.opengis.referencing.crs" class="externalLink"><code>CoordinateReferenceSystem</code></a> instances, |
| then only the properties relevant to the coordinate localization shall be compared. |
| Metadata like the <a href="../referencing/AbstractIdentifiedObject.html#getIdentifiers()">identifiers</a> |
| or the <a href="../referencing/AbstractReferenceSystem.html#getDomainOfValidity()">domain of validity</a>, |
| which have no impact on the coordinates being calculated, shall be ignored. |
| |
| <div class="section">Application to coordinate operations</div> |
| If the objects being compared are <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/operation/MathTransform.html?is-external=true" title="class or interface in org.opengis.referencing.operation" class="externalLink"><code>MathTransform</code></a> instances, |
| then two transforms defined in a different way may be considered equivalent. For example it is possible |
| to define a <a href="../referencing/operation/projection/Mercator.html" title="class in org.apache.sis.referencing.operation.projection">Mercator</a> projection in |
| two different ways, as a <cite>"Mercator (1SP)"</cite> or as a <cite>"Mercator (2SP)"</cite> projection, |
| each having their own set of parameters. |
| The <a href="#STRICT"><code>STRICT</code></a> or <a href="#BY_CONTRACT"><code>BY_CONTRACT</code></a> modes shall consider two projections as equal only if their |
| <a href="../referencing/operation/transform/AbstractMathTransform.html#getParameterValues()">parameter values</a> are strictly identical, while the <code>IGNORE_METADATA</code> mode can consider |
| those objects as equivalent despite difference in the set of parameters, as long as coordinate |
| transformations still produce the same results. |
| |
| <div class="note"><b>Example:</b> A <cite>"Mercator (2SP)"</cite> projection with a <cite>standard parallel</cite> |
| value of 60° produces the same results than a <cite>"Mercator (1SP)"</cite> projection with a <cite>scale factor</cite> |
| value of 0.5.</div></div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="Utilities.html#equalsIgnoreMetadata(java.lang.Object,java.lang.Object)"><code>Utilities.equalsIgnoreMetadata(Object, Object)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="APPROXIMATE"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>APPROXIMATE</h4> |
| <pre>public static final <a href="ComparisonMode.html" title="enum in org.apache.sis.util">ComparisonMode</a> APPROXIMATE</pre> |
| <div class="block">Only the attributes relevant to the object functionality are compared, with some tolerance |
| threshold on numerical values. |
| |
| <div class="section">Application to coordinate operations</div> |
| If two <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/operation/MathTransform.html?is-external=true" title="class or interface in org.opengis.referencing.operation" class="externalLink"><code>MathTransform</code></a> objects are considered equal according this mode, |
| then for any given identical source position, the two compared transforms shall compute at least approximately |
| the same target position. |
| A small difference is tolerated between the target coordinates calculated by the two math transforms. |
| How small is “small” is implementation dependent — the threshold can not be specified in the current |
| implementation, because of the non-linear nature of map projections.</div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.0</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="ALLOW_VARIANT"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>ALLOW_VARIANT</h4> |
| <pre>public static final <a href="ComparisonMode.html" title="enum in org.apache.sis.util">ComparisonMode</a> ALLOW_VARIANT</pre> |
| <div class="block">Most but not all attributes relevant to the object functionality are compared. |
| This comparison mode is equivalent to <a href="#APPROXIMATE"><code>APPROXIMATE</code></a>, except that it |
| ignores some attributes that may differ between objects not equal but related. |
| |
| <p>The main purpose of this method is to verify if two Coordinate Reference Systems (CRS) |
| are approximately equal ignoring axis order.</p> |
| |
| <div class="note"><b>Example:</b> |
| consider two geographic coordinate reference systems with the same attributes except axis order, |
| where one CRS uses (<var>latitude</var>, <var>longitude</var>) axes |
| and the other CRS uses (<var>longitude</var>, <var>latitude</var>) axes. |
| All comparison modes (even <code>APPROXIMATE</code>) will consider those two CRS as different, |
| except this <code>ALLOW_VARIANT</code> mode which will consider one CRS to be a variant of the other. |
| </div></div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>0.7</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="DEBUG"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>DEBUG</h4> |
| <pre><a href="Debug.html" title="annotation in org.apache.sis.util">@Debug</a> |
| public static final <a href="ComparisonMode.html" title="enum in org.apache.sis.util">ComparisonMode</a> DEBUG</pre> |
| <div class="block">Same as <a href="#APPROXIMATE"><code>APPROXIMATE</code></a>, except that an <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/AssertionError.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>AssertionError</code></a> is thrown if the two |
| objects are not equal and assertions are enabled. The exception message and stack trace help |
| to locate which attributes are not equal. This mode is typically used in assertions like below: |
| |
| <blockquote><pre><font color="green">assert</font> Utilities.<b>deepEquals</b>(object1, object2, ComparisonMode.DEBUG);</pre></blockquote> |
| |
| Note that a comparison in <code>DEBUG</code> mode may still return <code>false</code> without |
| throwing an exception, since not all corner cases are tested. The exception is only |
| intended to provide more details for some common cases.</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| <!-- ============ FIELD DETAIL =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="field.detail"> |
| <!-- --> |
| </a> |
| <h3>Field Detail</h3> |
| <a id="APPROXIMATIVE"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>APPROXIMATIVE</h4> |
| <pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang" class="externalLink">@Deprecated</a> |
| public static final <a href="ComparisonMode.html" title="enum in org.apache.sis.util">ComparisonMode</a> APPROXIMATIVE</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">Renamed <a href="#APPROXIMATE"><code>APPROXIMATE</code></a>.</div> |
| </div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://issues.apache.org/jira/browse/SIS-440">SIS-440</a></dd> |
| </dl> |
| </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="values()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>values</h4> |
| <pre class="methodSignature">public static <a href="ComparisonMode.html" title="enum in org.apache.sis.util">ComparisonMode</a>[] values()</pre> |
| <div class="block">Returns an array containing the constants of this enum type, in |
| the order they are declared. This method may be used to iterate |
| over the constants as follows: |
| <pre> |
| for (ComparisonMode c : ComparisonMode.values()) |
| System.out.println(c); |
| </pre></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>an array containing the constants of this enum type, in the order they are declared</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="valueOf(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>valueOf</h4> |
| <pre class="methodSignature">public static <a href="ComparisonMode.html" title="enum in org.apache.sis.util">ComparisonMode</a> valueOf​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> name)</pre> |
| <div class="block">Returns the enum constant of this type with the specified name. |
| The string must match <i>exactly</i> an identifier used to declare an |
| enum constant in this type. (Extraneous whitespace characters are |
| not permitted.)</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - the name of the enum constant to be returned.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the enum constant with the specified name</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - if this enum type has no constant with the specified name</dd> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang" class="externalLink">NullPointerException</a></code> - if the argument is null</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="isIgnoringMetadata()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isIgnoringMetadata</h4> |
| <pre class="methodSignature">public boolean isIgnoringMetadata()</pre> |
| <div class="block">Returns <code>true</code> if this comparison ignores metadata. |
| This method currently returns <code>true</code> for <code>IGNORE_METADATA</code>, <code>APPROXIMATE</code> |
| or <code>DEBUG</code> only, but this list may be extended in future SIS versions.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>whether this comparison ignore metadata.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>0.6</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="isApproximate()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isApproximate</h4> |
| <pre class="methodSignature">public boolean isApproximate()</pre> |
| <div class="block">Returns <code>true</code> if this comparison uses a tolerance threshold. |
| This method currently returns <code>true</code> for <code>APPROXIMATE</code> or <code>DEBUG</code> only, |
| but this list may be extended in future SIS versions.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>whether this comparison uses a tolerance threshold.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.0</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="isApproximative()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isApproximative</h4> |
| <pre class="methodSignature"><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang" class="externalLink">@Deprecated</a> |
| public boolean isApproximative()</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">Renamed <a href="#isApproximate()"><code>isApproximate()</code></a>.</div> |
| </div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://issues.apache.org/jira/browse/SIS-440">SIS-440</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="equalityLevel(java.lang.Object,java.lang.Object)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>equalityLevel</h4> |
| <pre class="methodSignature">public static <a href="ComparisonMode.html" title="enum in org.apache.sis.util">ComparisonMode</a> equalityLevel​(<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> o1, |
| <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> o2)</pre> |
| <div class="block">If the two given objects are equal according one of the modes enumerated in this class, |
| then returns that mode. Otherwise returns <code>null</code>. |
| |
| <p><b>Note:</b> this method never return the <a href="#DEBUG"><code>DEBUG</code></a> mode.</p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>o1</code> - the first object to compare, or <code>null</code>.</dd> |
| <dd><code>o2</code> - the second object to compare, or <code>null</code>.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the most suitable comparison mode, or <code>null</code> if the two given objects |
| are not equal according any mode in this enumeration.</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/ComparisonMode.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><a href="#enum.constant.summary">Enum Constants</a> | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#enum.constant.detail">Enum Constants</a> | </li> |
| <li><a href="#field.detail">Field</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 © 2010–2019 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </footer> |
| </body> |
| </html> |