blob: 850c02b1133c370b86e05375712fadc5258e5ff8 [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>DefaultRepresentativeFraction (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.metadata.iso.identification.DefaultRepresentativeFraction class">
<meta name="keywords" content="castOrCopy()">
<meta name="keywords" content="getDenominator()">
<meta name="keywords" content="setDenominator()">
<meta name="keywords" content="setScale()">
<meta name="keywords" content="doubleValue()">
<meta name="keywords" content="floatValue()">
<meta name="keywords" content="longValue()">
<meta name="keywords" content="intValue()">
<meta name="keywords" content="isEmpty()">
<meta name="keywords" content="freeze()">
<meta name="keywords" content="clone()">
<meta name="keywords" content="equals()">
<meta name="keywords" content="hashCode()">
<meta name="keywords" content="toString()">
<meta name="keywords" content="getIdentifiers()">
<meta name="keywords" content="getIdentifierMap()">
<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="DefaultRepresentativeFraction (Apache SIS 1.0 API)";
}
}
catch(err) {
}
//-->
var data = {"i0":9,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance 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/DefaultRepresentativeFraction.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><a href="#constructor.summary">Constr</a>&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><a href="#constructor.detail">Constr</a>&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.metadata.iso.identification</a></div>
<h2 title="Class DefaultRepresentativeFraction" class="title">Class DefaultRepresentativeFraction</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/Number.html?is-external=true" title="class or interface in java.lang" class="externalLink">Number</a></li>
<li>
<ul class="inheritance">
<li>DefaultRepresentativeFraction</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/Cloneable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Cloneable</a></code>, <code><a href="../../../util/Emptiable.html" title="interface in org.apache.sis.util">Emptiable</a></code>, <code><a href="../../../xml/IdentifiedObject.html" title="interface in org.apache.sis.xml">Identified­Object</a></code>, <code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/metadata/identification/RepresentativeFraction.html?is-external=true" title="class or interface in org.opengis.metadata.identification" class="externalLink">Representative­Fraction</a></code></dd>
</dl>
<hr>
<pre>public class <span class="typeNameLabel">DefaultRepresentativeFraction</span>
extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang" class="externalLink">Number</a>
implements <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/metadata/identification/RepresentativeFraction.html?is-external=true" title="class or interface in org.opengis.metadata.identification" class="externalLink">RepresentativeFraction</a>, <a href="../../../xml/IdentifiedObject.html" title="interface in org.apache.sis.xml">IdentifiedObject</a>, <a href="../../../util/Emptiable.html" title="interface in org.apache.sis.util">Emptiable</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Cloneable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Cloneable</a></pre>
<div class="block">A scale defined as the inverse of a denominator.
Scale is defined as a kind of <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Number</code></a>.
The following property is mandatory in a well-formed metadata according ISO 19115:
<div class="preformat"><code>MD_Representative­Fraction</code>
<code>  └─denominator…………………………</code> The number below the line in a vulgar fraction.</div>
In addition to the standard properties, SIS provides the following methods:
<ul>
<li><a href="#setScale(double)"><code>set­Scale(double)</code></a> for computing the denominator from a scale value.</li>
</ul>
<div class="section">Limitations</div>
<ul>
<li>Instances of this class are not synchronized for multi-threading.
Synchronization, if needed, is caller's responsibility.</li>
<li>Serialized objects of this class are not guaranteed to be compatible with future Apache SIS releases.
Serialization support is appropriate for short term storage or RMI between applications running the
same version of Apache SIS. For long term storage, use <a href="../../../xml/XML.html" title="class in org.apache.sis.xml"><code>XML</code></a> instead.</li>
</ul></div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>0.3</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="DefaultResolution.html#getEquivalentScale()"><code>Default­Resolution​.get­Equivalent­Scale()</code></a>,
<a href="../../../../../../serialized-form.html#org.apache.sis.metadata.iso.identification.DefaultRepresentativeFraction">Serialized Form</a></dd>
<p><font size="-1">Defined in the <code>sis-metadata</code> module</font></p>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E()">DefaultRepresentativeFraction</a></span>()</code></th>
<td class="colLast">
<div class="block">Creates a uninitialized representative fraction.</div>
</td>
</tr>
<tr class="rowColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(long)">DefaultRepresentativeFraction</a></span>&#8203;(long&nbsp;denominator)</code></th>
<td class="colLast">
<div class="block">Creates a new representative fraction from the specified denominator.</div>
</td>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(org.opengis.metadata.identification.RepresentativeFraction)">DefaultRepresentativeFraction</a></span>&#8203;(<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/metadata/identification/RepresentativeFraction.html?is-external=true" title="class or interface in org.opengis.metadata.identification" class="externalLink">RepresentativeFraction</a>&nbsp;object)</code></th>
<td class="colLast">
<div class="block">Constructs a new representative fraction initialized to the value of the given object.</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">&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="t2" class="tableTab"><span><a href="javascript:show(2);">Instance 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 <a href="DefaultRepresentativeFraction.html" title="class in org.apache.sis.metadata.iso.identification">DefaultRepresentativeFraction</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#castOrCopy(org.opengis.metadata.identification.RepresentativeFraction)">castOrCopy</a></span>&#8203;(<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/metadata/identification/RepresentativeFraction.html?is-external=true" title="class or interface in org.opengis.metadata.identification" class="externalLink">RepresentativeFraction</a>&nbsp;object)</code></th>
<td class="colLast">
<div class="block">Returns a SIS metadata implementation with the same values than the given arbitrary
implementation.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="DefaultRepresentativeFraction.html" title="class in org.apache.sis.metadata.iso.identification">DefaultRepresentativeFraction</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#clone()">clone</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns a modifiable copy of this representative fraction.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>double</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#doubleValue()">doubleValue</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the scale value of this representative fraction.</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="#equals(java.lang.Object)">equals</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;object)</code></th>
<td class="colLast">
<div class="block">Compares this object with the specified value for equality.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>float</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#floatValue()">floatValue</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the scale as a <code>float</code> type.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#freeze()">freeze</a></span>()</code></th>
<td class="colLast">
<div class="block">Makes this representative fraction unmodifiable.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getDenominator()">getDenominator</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the denominator of this representative fraction.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code><a href="../../../xml/IdentifierMap.html" title="interface in org.apache.sis.xml">IdentifierMap</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getIdentifierMap()">getIdentifierMap</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns a map view of the <a href="#getIdentifiers()">identifiers</a> collection as (<var>authority</var>,
<var>code</var>) entries.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink">Collection</a>&lt;<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/metadata/Identifier.html?is-external=true" title="class or interface in org.opengis.metadata" class="externalLink">Identifier</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getIdentifiers()">getIdentifiers</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns all identifiers associated to this object, or an empty collection if none.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hashCode()">hashCode</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns a hash value for this representative fraction.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#intValue()">intValue</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns 1 if the <a href="#getDenominator()">denominator</a> is equals to 1, or 0 otherwise.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isEmpty()">isEmpty</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns <code>true</code> if no scale is defined.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#longValue()">longValue</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns 1 if the <a href="#getDenominator()">denominator</a> is equals to 1, or 0 otherwise.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setDenominator(long)">setDenominator</a></span>&#8203;(long&nbsp;denominator)</code></th>
<td class="colLast">
<div class="block">Sets the denominator value.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setScale(double)">setScale</a></span>&#8203;(double&nbsp;scale)</code></th>
<td class="colLast">
<div class="block">Sets the denominator from a scale in the (0 … 1] range.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code><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></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toString()">toString</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns a string representation of this scale, or <code>Na­N</code> if undefined.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.Number">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang" class="externalLink">Number</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Number.html?is-external=true#byteValue()" title="class or interface in java.lang" class="externalLink">byte­Value</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Number.html?is-external=true#shortValue()" title="class or interface in java.lang" class="externalLink">short­Value</a></code></li>
</ul>
<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#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#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#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">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a id="&lt;init&gt;()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DefaultRepresentativeFraction</h4>
<pre>public&nbsp;DefaultRepresentativeFraction()</pre>
<div class="block">Creates a uninitialized representative fraction.
The <a href="#getDenominator()">denominator</a> is initially zero
and the <a href="#doubleValue()">double value</a> is NaN.</div>
</li>
</ul>
<a id="&lt;init&gt;(long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DefaultRepresentativeFraction</h4>
<pre>public&nbsp;DefaultRepresentativeFraction&#8203;(long&nbsp;denominator)</pre>
<div class="block">Creates a new representative fraction from the specified denominator.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>denominator</code> - the denominator as a positive number, or 0 if unspecified.</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">Illegal­Argument­Exception</a></code> - if the given value is negative.</dd>
</dl>
</li>
</ul>
<a id="&lt;init&gt;(org.opengis.metadata.identification.RepresentativeFraction)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DefaultRepresentativeFraction</h4>
<pre>public&nbsp;DefaultRepresentativeFraction&#8203;(<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/metadata/identification/RepresentativeFraction.html?is-external=true" title="class or interface in org.opengis.metadata.identification" class="externalLink">RepresentativeFraction</a>&nbsp;object)</pre>
<div class="block">Constructs a new representative fraction initialized to the value of the given object.
<div class="note"><b>Note on properties validation:</b>
This constructor does not verify the property values of the given metadata (e.g. whether it contains
unexpected negative values). This is because invalid metadata exist in practice, and verifying their
validity in this copy constructor is often too late. Note that this is not the only hole, as invalid
metadata instances can also be obtained by unmarshalling an invalid XML document.
</div></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>object</code> - the metadata to copy values from, or <code>null</code> if none.</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="castOrCopy(org.opengis.metadata.identification.RepresentativeFraction)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>castOrCopy</h4>
<pre class="methodSignature">public static&nbsp;<a href="DefaultRepresentativeFraction.html" title="class in org.apache.sis.metadata.iso.identification">DefaultRepresentativeFraction</a>&nbsp;castOrCopy&#8203;(<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/metadata/identification/RepresentativeFraction.html?is-external=true" title="class or interface in org.opengis.metadata.identification" class="externalLink">RepresentativeFraction</a>&nbsp;object)</pre>
<div class="block">Returns a SIS metadata implementation with the same values than the given arbitrary
implementation. If the given object is <code>null</code>, then this method returns <code>null</code>.
Otherwise if the given object is already a SIS implementation, then the given object is
returned unchanged. Otherwise a new SIS implementation is created and initialized to the
property values of the given object, using a <cite>shallow</cite> copy operation
(i.e. properties are not cloned).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>object</code> - the object to get as a SIS implementation, or <code>null</code> if none.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a SIS implementation containing the values of the given object (may be the
given object itself), or <code>null</code> if the argument was null.</dd>
</dl>
</li>
</ul>
<a id="getDenominator()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDenominator</h4>
<pre class="methodSignature"><a href="../../../measure/ValueRange.html" title="annotation in org.apache.sis.measure">@ValueRange</a>(<a href="../../../measure/ValueRange.html#minimum()">minimum</a>=0.0)
public&nbsp;long&nbsp;getDenominator()</pre>
<div class="block">Returns the denominator of this representative fraction.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/metadata/identification/RepresentativeFraction.html?is-external=true#getDenominator()" title="class or interface in org.opengis.metadata.identification" class="externalLink">get­Denominator</a></code>&nbsp;in interface&nbsp;<code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/metadata/identification/RepresentativeFraction.html?is-external=true" title="class or interface in org.opengis.metadata.identification" class="externalLink">Representative­Fraction</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the denominator.</dd>
</dl>
</li>
</ul>
<a id="setDenominator(long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setDenominator</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setDenominator&#8203;(long&nbsp;denominator)</pre>
<div class="block">Sets the denominator value.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>denominator</code> - the new denominator value, or 0 if none.</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">Illegal­Argument­Exception</a></code> - if the given value is negative.</dd>
</dl>
</li>
</ul>
<a id="setScale(double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setScale</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setScale&#8203;(double&nbsp;scale)</pre>
<div class="block">Sets the denominator from a scale in the (0 … 1] range.
The denominator is computed by <code>round(1 / scale)</code>.
<p>The equivalent of a <code>get­Scale()</code> method is <a href="#doubleValue()"><code>double­Value()</code></a>.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>scale</code> - the scale as a number between 0 exclusive and 1 inclusive, or NaN.</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">Illegal­Argument­Exception</a></code> - if the given scale is our of range.</dd>
</dl>
</li>
</ul>
<a id="doubleValue()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>doubleValue</h4>
<pre class="methodSignature">public&nbsp;double&nbsp;doubleValue()</pre>
<div class="block">Returns the scale value of this representative fraction.
This method is the converse of <a href="#setScale(double)"><code>set­Scale(double)</code></a>.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/metadata/identification/RepresentativeFraction.html?is-external=true#doubleValue()" title="class or interface in org.opengis.metadata.identification" class="externalLink">double­Value</a></code>&nbsp;in interface&nbsp;<code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/metadata/identification/RepresentativeFraction.html?is-external=true" title="class or interface in org.opengis.metadata.identification" class="externalLink">Representative­Fraction</a></code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Number.html?is-external=true#doubleValue()" title="class or interface in java.lang" class="externalLink">double­Value</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang" class="externalLink">Number</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the scale value of this representative fraction, or NaN if none.</dd>
</dl>
</li>
</ul>
<a id="floatValue()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>floatValue</h4>
<pre class="methodSignature">public&nbsp;float&nbsp;floatValue()</pre>
<div class="block">Returns the scale as a <code>float</code> type.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Number.html?is-external=true#floatValue()" title="class or interface in java.lang" class="externalLink">float­Value</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang" class="externalLink">Number</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the scale.</dd>
</dl>
</li>
</ul>
<a id="longValue()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>longValue</h4>
<pre class="methodSignature">public&nbsp;long&nbsp;longValue()</pre>
<div class="block">Returns 1 if the <a href="#getDenominator()">denominator</a> is equals to 1, or 0 otherwise.
<div class="note"><b>Rational:</b>
This method is defined that way because scales smaller than 1 can
only be casted to 0, and NaN values are also represented by 0.</div></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Number.html?is-external=true#longValue()" title="class or interface in java.lang" class="externalLink">long­Value</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang" class="externalLink">Number</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>1 if the denominator is 1, or 0 otherwise.</dd>
</dl>
</li>
</ul>
<a id="intValue()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>intValue</h4>
<pre class="methodSignature">public&nbsp;int&nbsp;intValue()</pre>
<div class="block">Returns 1 if the <a href="#getDenominator()">denominator</a> is equals to 1, or 0 otherwise.
<div class="note"><b>Rational:</b>
This method is defined that way because scales smaller than 1 can
only be casted to 0, and NaN values are also represented by 0.</div></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Number.html?is-external=true#intValue()" title="class or interface in java.lang" class="externalLink">int­Value</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang" class="externalLink">Number</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>1 if the denominator is 1, or 0 otherwise.</dd>
</dl>
</li>
</ul>
<a id="isEmpty()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isEmpty</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;isEmpty()</pre>
<div class="block">Returns <code>true</code> if no scale is defined.
The following relationship shall hold:
<blockquote><pre><font color="green">assert</font> <b>isEmpty</b>() == Double.<b>isNaN</b>(<b>doubleValue</b>());</pre></blockquote></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../util/Emptiable.html#isEmpty()">is­Empty</a></code>&nbsp;in interface&nbsp;<code><a href="../../../util/Emptiable.html" title="interface in org.apache.sis.util">Emptiable</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if no scale is defined.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>0.6</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#doubleValue()"><code>double­Value()</code></a>,
<a href="#floatValue()"><code>float­Value()</code></a></dd>
</dl>
</li>
</ul>
<a id="freeze()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>freeze</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;freeze()</pre>
<div class="block">Makes this representative fraction unmodifiable. After invocation to this method,
any call to a setter method will throw an <a href="../../UnmodifiableMetadataException.html" title="class in org.apache.sis.metadata"><code>Unmodifiable­Metadata­Exception</code></a>.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>0.7</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../ModifiableMetadata.html#transitionTo(org.apache.sis.metadata.ModifiableMetadata.State)"><code>Modifiable­Metadata​.transition­To(Modifiable­Metadata​.State)</code></a></dd>
</dl>
</li>
</ul>
<a id="clone()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>clone</h4>
<pre class="methodSignature">public&nbsp;<a href="DefaultRepresentativeFraction.html" title="class in org.apache.sis.metadata.iso.identification">DefaultRepresentativeFraction</a>&nbsp;clone()</pre>
<div class="block">Returns a modifiable copy of this representative fraction.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><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></code>&nbsp;in class&nbsp;<code><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></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a modifiable copy of this representative fraction.</dd>
</dl>
</li>
</ul>
<a id="equals(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>equals</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;equals&#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;object)</pre>
<div class="block">Compares this object with the specified value for equality.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/metadata/identification/RepresentativeFraction.html?is-external=true#equals(java.lang.Object)" title="class or interface in org.opengis.metadata.identification" class="externalLink">equals</a></code>&nbsp;in interface&nbsp;<code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/metadata/identification/RepresentativeFraction.html?is-external=true" title="class or interface in org.opengis.metadata.identification" class="externalLink">Representative­Fraction</a></code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><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></code>&nbsp;in class&nbsp;<code><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></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>object</code> - the object to compare with.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if both objects are equal.</dd>
</dl>
</li>
</ul>
<a id="hashCode()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hashCode</h4>
<pre class="methodSignature">public&nbsp;int&nbsp;hashCode()</pre>
<div class="block">Returns a hash value for this representative fraction.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/metadata/identification/RepresentativeFraction.html?is-external=true#hashCode()" title="class or interface in org.opengis.metadata.identification" class="externalLink">hash­Code</a></code>&nbsp;in interface&nbsp;<code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/metadata/identification/RepresentativeFraction.html?is-external=true" title="class or interface in org.opengis.metadata.identification" class="externalLink">Representative­Fraction</a></code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><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></code>&nbsp;in class&nbsp;<code><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></code></dd>
</dl>
</li>
</ul>
<a id="toString()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre class="methodSignature">public&nbsp;<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>&nbsp;toString()</pre>
<div class="block">Returns a string representation of this scale, or <code>Na­N</code> if undefined.
If defined, the string representation uses the colon as in "1:20000".</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><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></code>&nbsp;in class&nbsp;<code><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></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a string representation of this scale.</dd>
</dl>
</li>
</ul>
<a id="getIdentifiers()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getIdentifiers</h4>
<pre class="methodSignature">public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink">Collection</a>&lt;<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/metadata/Identifier.html?is-external=true" title="class or interface in org.opengis.metadata" class="externalLink">Identifier</a>&gt;&nbsp;getIdentifiers()</pre>
<div class="block">Returns all identifiers associated to this object, or an empty collection if none.
Those identifiers are marshalled in XML as <code>id</code> or <code>uuid</code> attributes.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../xml/IdentifiedObject.html#getIdentifiers()">get­Identifiers</a></code>&nbsp;in interface&nbsp;<code><a href="../../../xml/IdentifiedObject.html" title="interface in org.apache.sis.xml">Identified­Object</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>all identifiers associated to this object, or an empty collection if none.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../citation/DefaultCitation.html#getIdentifiers()"><code>Default­Citation​.get­Identifiers()</code></a>,
<a href="../acquisition/DefaultObjective.html#getIdentifiers()"><code>Default­Objective​.get­Identifiers()</code></a>,
<a href="../../../referencing/AbstractIdentifiedObject.html#getIdentifiers()"><code>Abstract­Identified­Object​.get­Identifiers()</code></a></dd>
</dl>
</li>
</ul>
<a id="getIdentifierMap()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getIdentifierMap</h4>
<pre class="methodSignature">public&nbsp;<a href="../../../xml/IdentifierMap.html" title="interface in org.apache.sis.xml">IdentifierMap</a>&nbsp;getIdentifierMap()</pre>
<div class="block">Returns a map view of the <a href="#getIdentifiers()">identifiers</a> collection as (<var>authority</var>,
<var>code</var>) entries. That map is <cite>live</cite>: changes in the identifiers list will be reflected
in the map, and conversely.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../xml/IdentifiedObject.html#getIdentifierMap()">get­Identifier­Map</a></code>&nbsp;in interface&nbsp;<code><a href="../../../xml/IdentifiedObject.html" title="interface in org.apache.sis.xml">Identified­Object</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the identifiers as a map of (<var>authority</var>, <var>code</var>) entries,
or an empty map if none.</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/DefaultRepresentativeFraction.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><a href="#constructor.summary">Constr</a>&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><a href="#constructor.detail">Constr</a>&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>