blob: 2b2fe3af6dca091e3b59684bf654ca1a81a2d77b [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (19) -->
<title>AngleFormat (Apache SIS 1.3 API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="declaration: package: org.apache.sis.measure, class: AngleFormat">
<meta name="generator" content="javadoc/ClassWriterImpl">
<meta name="keywords" content="org.apache.sis.measure.AngleFormat class">
<meta name="keywords" content="getInstance()">
<meta name="keywords" content="applyPattern()">
<meta name="keywords" content="toPattern()">
<meta name="keywords" content="getRoundingMode()">
<meta name="keywords" content="setRoundingMode()">
<meta name="keywords" content="getPrecision()">
<meta name="keywords" content="setPrecision()">
<meta name="keywords" content="getMinimumFractionDigits()">
<meta name="keywords" content="setMinimumFractionDigits()">
<meta name="keywords" content="getMaximumFractionDigits()">
<meta name="keywords" content="setMaximumFractionDigits()">
<meta name="keywords" content="setMaximumWidth()">
<meta name="keywords" content="format()">
<meta name="keywords" content="formatToCharacterIterator()">
<meta name="keywords" content="parse()">
<meta name="keywords" content="parseObject()">
<meta name="keywords" content="isFallbackAllowed()">
<meta name="keywords" content="setFallbackAllowed()">
<meta name="keywords" content="getLocale()">
<meta name="keywords" content="clone()">
<meta name="keywords" content="hashCode()">
<meta name="keywords" content="equals()">
<meta name="keywords" content="toString()">
<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="../../../../script-dir/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../jquery-ui.overrides.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
<script type="text/javascript" src="../../../../script-dir/jquery-3.6.0.min.js"></script>
<script type="text/javascript" src="../../../../script-dir/jquery-ui.min.js"></script>
</head>
<body class="class-declaration-page">
<script type="text/javascript">var pathtoroot = "../../../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top"><button id="navbar-toggle-button" aria-controls="navbar-top" aria-expanded="false" aria-label="Toggle navigation links"><span class="nav-bar-toggle-icon">&nbsp;</span><span class="nav-bar-toggle-icon">&nbsp;</span><span class="nav-bar-toggle-icon">&nbsp;</span></button>
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="nav-bar-cell1-rev">Class</li>
<li><a href="class-use/AngleFormat.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#class">Help</a></li>
</ul>
<ul class="sub-nav-list-small">
<li>
<p>Summary:</p>
<ul>
<li><a href="#nested-class-summary">Nested</a></li>
<li>Field</li>
<li><a href="#constructor-summary">Constr</a></li>
<li><a href="#method-summary">Method</a></li>
</ul>
</li>
<li>
<p>Detail:</p>
<ul>
<li>Field</li>
<li><a href="#constructor-detail">Constr</a></li>
<li><a href="#method-detail">Method</a></li>
</ul>
</li>
</ul>
</div>
<div class="sub-nav">
<div id="navbar-sub-list">
<ul class="sub-nav-list">
<li>Summary:&nbsp;</li>
<li><a href="#nested-class-summary">Nested</a>&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="sub-nav-list">
<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>
<div class="nav-list-search"><a href="../../../../search.html">SEARCH</a>
<input type="text" id="search-input" disabled placeholder="Search">
<input type="reset" id="reset-button" disabled value="reset">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">org.apache.sis.measure</a></div>
<h1 title="Class AngleFormat" class="title">Class AngleFormat</h1>
</div>
<div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>
<div class="inheritance"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/text/Format.html" title="class or interface in java.text" class="external-link">Format</a>
<div class="inheritance">AngleFormat</div>
</div>
</div>
<section class="class-description" id="class-description">
<dl class="notes">
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/io/Serializable.html" title="class or interface in java.io" class="external-link">Serializable</a></code>, <code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Cloneable.html" title="class or interface in java.lang" class="external-link">Cloneable</a></code>, <code><a href="../util/Localized.html" title="interface in org.apache.sis.util">Localized</a></code></dd>
</dl>
<hr>
<div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">AngleFormat</span>
<span class="extends-implements">extends <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/text/Format.html" title="class or interface in java.text" class="external-link">Format</a>
implements <a href="../util/Localized.html" title="interface in org.apache.sis.util">Localized</a></span></div>
<div class="block">Parses and formats angles according a specified pattern. The pattern is a string
containing any characters, with a special meaning for the following characters:
<table class="sis">
<caption>Reserved characters</caption>
<tr><th>Symbol</th><th>Meaning</th></tr>
<tr><td><code>D</code></td><td>The integer part of degrees</td></tr>
<tr><td><code>d</code></td><td>The fractional part of degrees</td></tr>
<tr><td><code>M</code></td><td>The integer part of minutes</td></tr>
<tr><td><code>m</code></td><td>The fractional part of minutes</td></tr>
<tr><td><code>S</code></td><td>The integer part of seconds</td></tr>
<tr><td><code>s</code></td><td>The fractional part of seconds</td></tr>
<tr><td><code>#</code></td><td>Fraction digits shown only if non-zero</td></tr>
<tr><td><code>.</code></td><td>The decimal separator</td></tr>
<tr><td><code>?</code></td><td>Omit the preceding field if zero</td></tr>
</table>
Upper-case letters <code>D</code>, <code>M</code> and <code>S</code> stand for the integer parts of degrees,
minutes and seconds respectively. If present, they shall appear in that order.
<div class="note"><b>Example:</b>
"<code>M′D</code>" is illegal because "<code>M</code>" and "<code>S</code>" are in reverse order.
"<code>D°S</code>" is also illegal because "<code>M</code>" is missing between "<code>D</code>" and "<code>S</code>".</div>
Lower-case letters <code>d</code>, <code>m</code> and <code>s</code> stand for fractional parts of degrees, minutes and
seconds respectively. Only one of those can appear in a pattern. If present, they must be in the last field.
<div class="note"><b>Example:</b>
"<code>D​.dd°MM′</code>" is illegal because "<code>d</code>" is followed by "<code>M</code>".
"<code>D​.mm</code>" is also illegal because "<code>m</code>" is not the fractional part of "<code>D</code>".</div>
The number of occurrences of <code>D</code>, <code>M</code>, <code>S</code> and their lower-case counterpart is the number
of digits to format.
<div class="note"><b>Example:</b>
"<code>DD​.ddd</code>" will format angles with two digits for the integer part and three digits
for the fractional part (e.g. <code>4.4578</code> will be formatted as <code>"04.458"</code>).</div>
Separator characters like <code>°</code>, <code></code> and <code></code> are inserted "as-is" in the formatted string,
except the decimal separator dot (<code>.</code>) which is replaced by the local-dependent decimal separator.
Separator characters may be completely omitted; <code>Angle­Format</code> will still differentiate degrees,
minutes and seconds fields according the pattern.
<div class="note"><b>Example:</b>
"<code>0480439</code>" with the "<code>DDDMMmm</code>" pattern will be parsed as 48°04.39′.</div>
The <code>?</code> modifier specifies that the preceding field can be omitted if its value is zero.
Any field can be omitted for <a href="Angle.html" title="class in org.apache.sis.measure"><code>Angle</code></a> object, but only trailing fields are omitted for
<a href="Longitude.html" title="class in org.apache.sis.measure"><code>Longitude</code></a> and <a href="Latitude.html" title="class in org.apache.sis.measure"><code>Latitude</code></a>.
<div class="note"><b>Example:</b>
"<code>DD°MM′?SS″?</code>" will format an angle of 12.01° as <code>12°36″</code>,
but a longitude of 12.01°N as <code>12°00′36″N</code> (not <code>12°36″N</code>).</div>
The above special case exists because some kind of angles are expected to be very small (e.g. rotation angles in
<a href="../referencing/datum/BursaWolfParameters.html" title="class in org.apache.sis.referencing.datum">Bursa-Wolf parameters</a> are given in arc-seconds),
while longitude and latitude values are usually distributed over their full ±180° or ±90° range. Since longitude
or latitude values without the degrees field are unusual, omitting that field is likely to increase the
risk of confusion in those cases.
<div class="note"><b>Examples:</b>
<table class="sis">
<caption>Pattern examples</caption>
<tr><th>Pattern </th> <th>48.5 </th> <th>-12.53125 </th></tr>
<tr><td><code>DD°MM′SS.#″</code> </td> <td>48°30′00″ </td> <td>-12°31′52.5″ </td></tr>
<tr><td><code>DD°MM′</code> </td> <td>48°30′ </td> <td>-12°32′ </td></tr>
<tr><td><code>DD.ddd</code> </td> <td>48.500 </td> <td>-12.531 </td></tr>
<tr><td><code>DD.###</code> </td> <td>48.5 </td> <td>-12.531 </td></tr>
<tr><td><code>DDMM</code> </td> <td>4830 </td> <td>-1232 </td></tr>
<tr><td><code>DDMMSSs</code> </td> <td>4830000 </td> <td>-1231525 </td></tr>
<tr><td><code>DD°MM′?SS.s″?</code> </td> <td>48°30′ </td> <td>-12°31′52.5″ </td></tr>
</table>
</div></div>
<dl class="notes">
<dt>Since:</dt>
<dd>0.3</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="Angle.html" title="class in org.apache.sis.measure"><code>Angle</code></a></li>
<li><a href="Latitude.html" title="class in org.apache.sis.measure"><code>Latitude</code></a></li>
<li><a href="Longitude.html" title="class in org.apache.sis.measure"><code>Longitude</code></a></li>
<li><a href="../geometry/CoordinateFormat.html" title="class in org.apache.sis.geometry"><code>Coordinate­Format</code></a></li>
<li><a href="../../../../serialized-form.html#org.apache.sis.measure.AngleFormat">Serialized Form</a></li>
</ul>
</dd>
<p><font size="-1">Defined in the <code>sis-utility</code> module</font></p>
</dl>
</section>
<section class="summary">
<ul class="summary-list">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<li>
<section class="nested-class-summary" id="nested-class-summary">
<h2>Nested Class Summary</h2>
<div class="caption"><span>Nested Classes</span></div>
<div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Class</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><code>static final class&nbsp;</code></div>
<div class="col-second even-row-color"><code><a href="AngleFormat.Field.html" class="type-name-link" title="class in org.apache.sis.measure">Angle­Format​.Field</a></code></div>
<div class="col-last even-row-color">
<div class="block">Constants that are used as attribute keys in the iterator returned from
<a href="#formatToCharacterIterator(java.lang.Object)"><code>format­To­Character­Iterator(Object)</code></a>.</div>
</div>
</div>
</section>
</li>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<li>
<section class="constructor-summary" id="constructor-summary">
<h2>Constructor Summary</h2>
<div class="caption"><span>Constructors</span></div>
<div class="summary-table two-column-summary">
<div class="table-header col-first">Constructor</div>
<div class="table-header col-last">Description</div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E()" class="member-name-link">Angle­Format</a>()</code></div>
<div class="col-last even-row-color">
<div class="block">Constructs a new <code>Angle­Format</code> for the default pattern and the current default locale.</div>
</div>
<div class="col-constructor-name odd-row-color"><code><a href="#%3Cinit%3E(java.lang.String)" class="member-name-link">Angle­Format</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;pattern)</code></div>
<div class="col-last odd-row-color">
<div class="block">Constructs a new <code>Angle­Format</code> for the specified pattern and the current default locale.</div>
</div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(java.lang.String,java.util.Locale)" class="member-name-link">Angle­Format</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;pattern,
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/Locale.html" title="class or interface in java.util" class="external-link">Locale</a>&nbsp;locale)</code></div>
<div class="col-last even-row-color">
<div class="block">Constructs a new <code>Angle­Format</code> using the specified pattern and locale.</div>
</div>
<div class="col-constructor-name odd-row-color"><code><a href="#%3Cinit%3E(java.util.Locale)" class="member-name-link">Angle­Format</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/Locale.html" title="class or interface in java.util" class="external-link">Locale</a>&nbsp;locale)</code></div>
<div class="col-last odd-row-color">
<div class="block">Constructs a new <code>Angle­Format</code> for the default pattern and the specified locale.</div>
</div>
</div>
</section>
</li>
<!-- ========== METHOD SUMMARY =========== -->
<li>
<section class="method-summary" id="method-summary">
<h2>Method Summary</h2>
<div id="method-summary-table">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab1" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab1', 3)" class="table-tab">Static Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel">
<div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#applyPattern(java.lang.String)" class="member-name-link">apply­Pattern</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;pattern)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Sets the pattern to use for parsing and formatting angles.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="AngleFormat.html" title="class in org.apache.sis.measure">Angle­Format</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#clone()" class="member-name-link">clone</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns a clone of this <code>Angle­Format</code>.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#equals(java.lang.Object)" class="member-name-link">equals</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;object)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Compares this format with the specified object for equality.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>final <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#format(double)" class="member-name-link">format</a><wbr>(double&nbsp;angle)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Formats an angle.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/StringBuffer.html" title="class or interface in java.lang" class="external-link">String­Buffer</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#format(double,java.lang.StringBuffer,java.text.FieldPosition)" class="member-name-link">format</a><wbr>(double&nbsp;angle,
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/StringBuffer.html" title="class or interface in java.lang" class="external-link">String­Buffer</a>&nbsp;to­Append­To,
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/text/FieldPosition.html" title="class or interface in java.text" class="external-link">Field­Position</a>&nbsp;pos)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Formats an angle in the given buffer.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/StringBuffer.html" title="class or interface in java.lang" class="external-link">String­Buffer</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#format(java.lang.Object,java.lang.StringBuffer,java.text.FieldPosition)" class="member-name-link">format</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;value,
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/StringBuffer.html" title="class or interface in java.lang" class="external-link">String­Buffer</a>&nbsp;to­Append­To,
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/text/FieldPosition.html" title="class or interface in java.text" class="external-link">Field­Position</a>&nbsp;pos)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Formats an angle, latitude or longitude value in the given buffer.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/text/AttributedCharacterIterator.html" title="class or interface in java.text" class="external-link">Attributed­Character­Iterator</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#formatToCharacterIterator(java.lang.Object)" class="member-name-link">format­To­Character­Iterator</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;value)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Formats an angle, latitude or longitude value as an attributed character iterator.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="AngleFormat.html" title="class in org.apache.sis.measure">Angle­Format</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getInstance()" class="member-name-link">get­Instance</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Constructs a new <code>Angle­Format</code> for the default pattern and the current default locale.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="AngleFormat.html" title="class in org.apache.sis.measure">Angle­Format</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getInstance(java.util.Locale)" class="member-name-link">get­Instance</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/Locale.html" title="class or interface in java.util" class="external-link">Locale</a>&nbsp;locale)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Constructs a new <code>Angle­Format</code> for the default pattern and the specified locale.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/Locale.html" title="class or interface in java.util" class="external-link">Locale</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getLocale()" class="member-name-link">get­Locale</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns this formatter locale.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getMaximumFractionDigits()" class="member-name-link">get­Maximum­Fraction­Digits</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the maximum number of digits allowed in the fraction portion of the last field.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getMinimumFractionDigits()" class="member-name-link">get­Minimum­Fraction­Digits</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the minimum number of digits allowed in the fraction portion of the last field.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>double</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getPrecision()" class="member-name-link">get­Precision</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the precision of angles formatted by current pattern, in decimal degrees.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/math/RoundingMode.html" title="class or interface in java.math" class="external-link">Rounding­Mode</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getRoundingMode()" class="member-name-link">get­Rounding­Mode</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the rounding mode.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#hashCode()" class="member-name-link">hash­Code</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns a "hash value" for this object.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isFallbackAllowed()" class="member-name-link">is­Fallback­Allowed</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns <code>true</code> if the <a href="#parse(java.lang.String,java.text.ParsePosition)"><code>parse</code></a> methods are allowed
to fallback on the build-in default symbols if the string to parse doesn't match the
<a href="#applyPattern(java.lang.String)">applied pattern</a>.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="Angle.html" title="class in org.apache.sis.measure">Angle</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#parse(java.lang.String)" class="member-name-link">parse</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;source)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Parses the given string as an angle.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="Angle.html" title="class in org.apache.sis.measure">Angle</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#parse(java.lang.String,java.text.ParsePosition)" class="member-name-link">parse</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;source,
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/text/ParsePosition.html" title="class or interface in java.text" class="external-link">Parse­Position</a>&nbsp;pos)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Parses the given string as an angle.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#parseObject(java.lang.String)" class="member-name-link">parse­Object</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;source)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Parses the given string as an object.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#parseObject(java.lang.String,java.text.ParsePosition)" class="member-name-link">parse­Object</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;source,
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/text/ParsePosition.html" title="class or interface in java.text" class="external-link">Parse­Position</a>&nbsp;pos)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Parses a substring as an object.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setFallbackAllowed(boolean)" class="member-name-link">set­Fallback­Allowed</a><wbr>(boolean&nbsp;allowed)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Sets whether the <a href="#parse(java.lang.String,java.text.ParsePosition)"><code>parse</code></a> methods are allowed to
fallback on the build-in default symbols if the string to parse doesn't match the
<a href="#applyPattern(java.lang.String)">applied pattern</a>.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setMaximumFractionDigits(int)" class="member-name-link">set­Maximum­Fraction­Digits</a><wbr>(int&nbsp;count)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Sets the maximum number of digits allowed in the fraction portion of the last field.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setMaximumWidth(int)" class="member-name-link">set­Maximum­Width</a><wbr>(int&nbsp;width)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Modifies, if needed, the pattern in order to fit formatted angles in the given maximum
total width.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setMinimumFractionDigits(int)" class="member-name-link">set­Minimum­Fraction­Digits</a><wbr>(int&nbsp;count)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Sets the minimum number of digits allowed in the fraction portion of the last field.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setPrecision(double,boolean)" class="member-name-link">set­Precision</a><wbr>(double&nbsp;resolution,
boolean&nbsp;allow­Field­Changes)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Adjusts the number of fraction digits, and optionally the visible fields, for the given precision.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setRoundingMode(java.math.RoundingMode)" class="member-name-link">set­Rounding­Mode</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/math/RoundingMode.html" title="class or interface in java.math" class="external-link">Rounding­Mode</a>&nbsp;mode)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Sets the rounding mode to the specified value.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#toPattern()" class="member-name-link">to­Pattern</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the pattern used for parsing and formatting angles.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#toString()" class="member-name-link">to­String</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns a string representation of this object for debugging purpose.</div>
</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-Format">Methods inherited from class&nbsp;<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/text/Format.html" title="class or interface in java.text" class="external-link">Format</a></h3>
<code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/text/Format.html#format(java.lang.Object)" title="class or interface in java.text" class="external-link">format</a></code></div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-Object">Methods inherited from class&nbsp;<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3>
<code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">get­Class</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notify­All</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<li>
<section class="constructor-details" id="constructor-detail">
<h2>Constructor Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="&lt;init&gt;()">
<h3>AngleFormat</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">AngleFormat</span>()</div>
<div class="block">Constructs a new <code>Angle­Format</code> for the default pattern and the current default locale.</div>
</section>
</li>
<li>
<section class="detail" id="&lt;init&gt;(java.util.Locale)">
<h3>AngleFormat</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">AngleFormat</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/Locale.html" title="class or interface in java.util" class="external-link">Locale</a>&nbsp;locale)</span></div>
<div class="block">Constructs a new <code>Angle­Format</code> for the default pattern and the specified locale.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>locale</code> - the locale to use.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="&lt;init&gt;(java.lang.String)">
<h3>AngleFormat</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">AngleFormat</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;pattern)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></span></div>
<div class="block">Constructs a new <code>Angle­Format</code> for the specified pattern and the current default locale.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>pattern</code> - the pattern to use for parsing and formatting angles.
See class description for an explanation of pattern syntax.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">Illegal­Argument­Exception</a></code> - if the specified pattern is illegal.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="&lt;init&gt;(java.lang.String,java.util.Locale)">
<h3>AngleFormat</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">AngleFormat</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;pattern,
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/Locale.html" title="class or interface in java.util" class="external-link">Locale</a>&nbsp;locale)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></span></div>
<div class="block">Constructs a new <code>Angle­Format</code> using the specified pattern and locale.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>pattern</code> - the pattern to use for parsing and formatting angles.
See class description for an explanation of pattern syntax.</dd>
<dd><code>locale</code> - the locale to use.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">Illegal­Argument­Exception</a></code> - if the specified pattern is illegal.</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="getInstance()">
<h3>getInstance</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="AngleFormat.html" title="class in org.apache.sis.measure">AngleFormat</a></span>&nbsp;<span class="element-name">getInstance</span>()</div>
<div class="block">Constructs a new <code>Angle­Format</code> for the default pattern and the current default locale.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>an angle format for the current default locale.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getInstance(java.util.Locale)">
<h3>getInstance</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="AngleFormat.html" title="class in org.apache.sis.measure">AngleFormat</a></span>&nbsp;<span class="element-name">getInstance</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/Locale.html" title="class or interface in java.util" class="external-link">Locale</a>&nbsp;locale)</span></div>
<div class="block">Constructs a new <code>Angle­Format</code> for the default pattern and the specified locale.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>locale</code> - the locale to use.</dd>
<dt>Returns:</dt>
<dd>an angle format for the given locale.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="applyPattern(java.lang.String)">
<h3>applyPattern</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">applyPattern</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;pattern)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></span></div>
<div class="block">Sets the pattern to use for parsing and formatting angles.
See class description for a description of pattern syntax.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>pattern</code> - the pattern to use for parsing and formatting angle.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">Illegal­Argument­Exception</a></code> - if the specified pattern is not legal.</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="#setMinimumFractionDigits(int)"><code>set­Minimum­Fraction­Digits(int)</code></a></li>
<li><a href="#setMaximumFractionDigits(int)"><code>set­Maximum­Fraction­Digits(int)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="toPattern()">
<h3>toPattern</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name">toPattern</span>()</div>
<div class="block">Returns the pattern used for parsing and formatting angles.
See class description for an explanation of how patterns work.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the formatting pattern.</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="#getMinimumFractionDigits()"><code>get­Minimum­Fraction­Digits()</code></a></li>
<li><a href="#getMaximumFractionDigits()"><code>get­Maximum­Fraction­Digits()</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getRoundingMode()">
<h3>getRoundingMode</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/math/RoundingMode.html" title="class or interface in java.math" class="external-link">RoundingMode</a></span>&nbsp;<span class="element-name">getRoundingMode</span>()</div>
<div class="block">Returns the rounding mode. Default value is <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/math/RoundingMode.html#HALF_EVEN" title="class or interface in java.math" class="external-link"><code>Rounding­Mode​.HALF_EVEN</code></a>.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the rounding mode.</dd>
<dt>Since:</dt>
<dd>0.8</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/text/NumberFormat.html#getRoundingMode()" title="class or interface in java.text" class="external-link"><code>Number­Format​.get­Rounding­Mode()</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setRoundingMode(java.math.RoundingMode)">
<h3>setRoundingMode</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setRoundingMode</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/math/RoundingMode.html" title="class or interface in java.math" class="external-link">RoundingMode</a>&nbsp;mode)</span></div>
<div class="block">Sets the rounding mode to the specified value. The given mode can be one of the following:
<table class="sis">
<caption>Supported rounding modes</caption>
<tr><th>Rounding mode</th> <th>Result</th></tr>
<tr><td><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/math/RoundingMode.html#UP" title="class or interface in java.math" class="external-link"><code>UP</code></a></td> <td>Round away from zero.</td></tr>
<tr><td><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/math/RoundingMode.html#DOWN" title="class or interface in java.math" class="external-link"><code>DOWN</code></a></td> <td>Round towards zero.</td></tr>
<tr><td><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/math/RoundingMode.html#CEILING" title="class or interface in java.math" class="external-link"><code>CEILING</code></a></td> <td>Round towards positive infinity.</td></tr>
<tr><td><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/math/RoundingMode.html#FLOOR" title="class or interface in java.math" class="external-link"><code>FLOOR</code></a></td> <td>Round towards negative infinity.</td></tr>
<tr><td><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/math/RoundingMode.html#HALF_EVEN" title="class or interface in java.math" class="external-link"><code>HALF_EVEN</code></a></td> <td>Round towards nearest neighbor.</td></tr>
</table>
The <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/math/RoundingMode.html#HALF_UP" title="class or interface in java.math" class="external-link"><code>Rounding­Mode​.HALF_UP</code></a> and <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/math/RoundingMode.html#HALF_DOWN" title="class or interface in java.math" class="external-link"><code>HALF_DOWN</code></a> values are not supported
by the current <code>Angle­Format</code> implementation.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>mode</code> - the new rounding mode.</dd>
<dt>Since:</dt>
<dd>0.8</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list-long">
<li><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/text/NumberFormat.html#setRoundingMode(java.math.RoundingMode)" title="class or interface in java.text" class="external-link"><code>Number­Format​.set­Rounding­Mode(Rounding­Mode)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getPrecision()">
<h3>getPrecision</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">getPrecision</span>()</div>
<div class="block">Returns the precision of angles formatted by current pattern, in decimal degrees.
For example if the angle pattern is "D°MM′", then this method returns 1/60.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>precision in decimal degrees of angles formatted by current pattern.</dd>
<dt>Since:</dt>
<dd>1.1</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setPrecision(double,boolean)">
<h3>setPrecision</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setPrecision</span><wbr><span class="parameters">(double&nbsp;resolution,
boolean&nbsp;allowFieldChanges)</span></div>
<div class="block">Adjusts the number of fraction digits, and optionally the visible fields, for the given precision.
If the <code>allow­Field­Changes</code> argument is <code>false</code>, then this method adjusts only the
<a href="#setMinimumFractionDigits(int)">minimum</a> and <a href="#setMinimumFractionDigits(int)">maximum fraction digits</a> in order to show angles with at least the specified precision.
But if the <code>allow­Field­Changes</code> argument is <code>true</code>, then this method may change the
set of fields (degrees, minutes or seconds) to show before to adjust the number of fraction digits.
In that case, this method selects the first row in the following table where the precision matches the condition:
<table class="sis">
<caption>Selected fields for given precision</caption>
<tr><th>Precision</th> <th>Fields</th></tr>
<tr><td>≥ 1°</td> <td></td></tr>
<tr><td>≥ ⅒°</td> <td>D.d°</td></tr>
<tr><td>≥ 1′</td> <td>D°MM′</td></tr>
<tr><td>≥ ⅒′</td> <td>D°MM.m′</td></tr>
<tr><td>≥ 1″</td> <td>D°MM′SS″</td></tr>
<tr><td>≥ ⅒″</td> <td>D°MM′SS.s″</td></tr>
<tr><td>other</td> <td>D°MM′SS.ss…″</td></tr>
</table></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>resolution</code> - the desired angle resolution, in decimal degrees.</dd>
<dd><code>allow­Field­Changes</code> - whether this method is allowed to change the set of fields (degrees, minutes or seconds).</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">Illegal­Argument­Exception</a></code> - if the given resolution is NaN or infinite.</dd>
<dt>Since:</dt>
<dd>1.0</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getMinimumFractionDigits()">
<h3>getMinimumFractionDigits</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">getMinimumFractionDigits</span>()</div>
<div class="block">Returns the minimum number of digits allowed in the fraction portion of the last field.
This value can be set by the repetition of <code>'d'</code>, <code>'m'</code> or <code>'s'</code> symbol
in the pattern.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the minimum number of digits allowed in the fraction portion.</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list-long">
<li><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/text/DecimalFormat.html#getMinimumFractionDigits()" title="class or interface in java.text" class="external-link"><code>Decimal­Format​.get­Minimum­Fraction­Digits()</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setMinimumFractionDigits(int)">
<h3>setMinimumFractionDigits</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setMinimumFractionDigits</span><wbr><span class="parameters">(int&nbsp;count)</span></div>
<div class="block">Sets the minimum number of digits allowed in the fraction portion of the last field.
If the given value is greater than the <a href="#getMaximumFractionDigits()">maximum
number of fraction digits</a>, then that maximum number will be set to the given value too.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>count</code> - the minimum number of digits allowed in the fraction portion.</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list-long">
<li><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/text/DecimalFormat.html#setMinimumFractionDigits(int)" title="class or interface in java.text" class="external-link"><code>Decimal­Format​.set­Minimum­Fraction­Digits(int)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getMaximumFractionDigits()">
<h3>getMaximumFractionDigits</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">getMaximumFractionDigits</span>()</div>
<div class="block">Returns the maximum number of digits allowed in the fraction portion of the last field.
This value can be set by the repetition of <code>'#'</code> symbol in the pattern.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the maximum number of digits allowed in the fraction portion.</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list-long">
<li><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/text/DecimalFormat.html#getMaximumFractionDigits()" title="class or interface in java.text" class="external-link"><code>Decimal­Format​.get­Maximum­Fraction­Digits()</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setMaximumFractionDigits(int)">
<h3>setMaximumFractionDigits</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setMaximumFractionDigits</span><wbr><span class="parameters">(int&nbsp;count)</span></div>
<div class="block">Sets the maximum number of digits allowed in the fraction portion of the last field.
If the given value is smaller than the <a href="#getMinimumFractionDigits()">minimum
number of fraction digits</a>, then that minimum number will be set to the given value too.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>count</code> - the maximum number of digits allowed in the fraction portion.</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list-long">
<li><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/text/DecimalFormat.html#setMaximumFractionDigits(int)" title="class or interface in java.text" class="external-link"><code>Decimal­Format​.set­Maximum­Fraction­Digits(int)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setMaximumWidth(int)">
<h3>setMaximumWidth</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setMaximumWidth</span><wbr><span class="parameters">(int&nbsp;width)</span></div>
<div class="block">Modifies, if needed, the pattern in order to fit formatted angles in the given maximum
total width. This method applies zero, one or more of the following changes, in that order:
<ol>
<li>If needed, reduce the <a href="#setMaximumFractionDigits(int)">maximum number of
fraction digits</a>.</li>
<li>If omitting all fraction digits would not be sufficient for fitting a formatted
angle in the given width, remove the seconds field (if any) from the pattern.</li>
<li>If the above changes are not sufficient, remove the minutes field (if any) from
the pattern.</li>
<li>If the above changes are not sufficient, set the minimal width of degrees field to 1.</li>
</ol>
Note that despite the above changes, formatted angles may still be larger than the given
width if that width is small, or if the formatted angles are too large in magnitude.
<p>This method does not take into account the space needed for the hemisphere symbol when
formatting <a href="Latitude.html" title="class in org.apache.sis.measure"><code>Latitude</code></a> or <a href="Longitude.html" title="class in org.apache.sis.measure"><code>Longitude</code></a> objects.</p></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>width</code> - the maximum total width of formatted angle.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="format(double)">
<h3>format</h3>
<div class="member-signature"><span class="modifiers">public final</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name">format</span><wbr><span class="parameters">(double&nbsp;angle)</span></div>
<div class="block">Formats an angle. The angle will be formatted according the pattern given to the last call
of <a href="#applyPattern(java.lang.String)"><code>apply­Pattern(String)</code></a>.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>angle</code> - angle to format, in decimal degrees.</dd>
<dt>Returns:</dt>
<dd>the formatted string.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="format(double,java.lang.StringBuffer,java.text.FieldPosition)">
<h3>format</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/StringBuffer.html" title="class or interface in java.lang" class="external-link">StringBuffer</a></span>&nbsp;<span class="element-name">format</span><wbr><span class="parameters">(double&nbsp;angle,
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/StringBuffer.html" title="class or interface in java.lang" class="external-link">StringBuffer</a>&nbsp;toAppendTo,
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/text/FieldPosition.html" title="class or interface in java.text" class="external-link">FieldPosition</a>&nbsp;pos)</span></div>
<div class="block">Formats an angle in the given buffer. The angle will be formatted according
the pattern given to the last call of <a href="#applyPattern(java.lang.String)"><code>apply­Pattern(String)</code></a>.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>angle</code> - angle to format, in decimal degrees.</dd>
<dd><code>to­Append­To</code> - the buffer where to append the formatted angle.</dd>
<dd><code>pos</code> - an optional object where to store the position of the field in the formatted text,
or <code>null</code> if this information is not wanted. This field position shall be
created with one of the <a href="AngleFormat.Field.html" title="class in org.apache.sis.measure"><code>Angle­Format​.Field</code></a> constants.</dd>
<dt>Returns:</dt>
<dd>the <code>to­Append­To</code> buffer, returned for method calls chaining.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="format(java.lang.Object,java.lang.StringBuffer,java.text.FieldPosition)">
<h3>format</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/StringBuffer.html" title="class or interface in java.lang" class="external-link">StringBuffer</a></span>&nbsp;<span class="element-name">format</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;value,
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/StringBuffer.html" title="class or interface in java.lang" class="external-link">StringBuffer</a>&nbsp;toAppendTo,
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/text/FieldPosition.html" title="class or interface in java.text" class="external-link">FieldPosition</a>&nbsp;pos)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></span></div>
<div class="block">Formats an angle, latitude or longitude value in the given buffer.
The angular values will be formatted according the pattern given to the
last call of <a href="#applyPattern(java.lang.String)"><code>apply­Pattern(String)</code></a>, with some variations that
depend on the <code>value</code> class:
<ul>
<li>If <code>value</code> is a <a href="Latitude.html" title="class in org.apache.sis.measure"><code>Latitude</code></a> instance, then the value is formatted as a
positive angle followed by the "N" (positive value) or "S" (negative value) symbol.</li>
<li>If <code>value</code> is a <a href="Longitude.html" title="class in org.apache.sis.measure"><code>Longitude</code></a> instance, then the value is formatted as a
positive angle followed by the "E" (positive value) or "W" (negative value) symbol.</li>
<li>If <code>value</code> is any <a href="Angle.html" title="class in org.apache.sis.measure"><code>Angle</code></a> other than a <code>Latitude</code> or <code>Longitude</code>,
then it is formatted as by the <a href="#format(double,java.lang.StringBuffer,java.text.FieldPosition)"><code>format(double, String­Buffer, Field­Position)</code></a>
method.</li>
</ul></div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/text/Format.html#format(java.lang.Object,java.lang.StringBuffer,java.text.FieldPosition)" title="class or interface in java.text" class="external-link">format</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/text/Format.html" title="class or interface in java.text" class="external-link">Format</a></code></dd>
<dt>Parameters:</dt>
<dd><code>value</code> - <a href="Angle.html" title="class in org.apache.sis.measure"><code>Angle</code></a> object to format.</dd>
<dd><code>to­Append­To</code> - the buffer where to append the formatted angle.</dd>
<dd><code>pos</code> - an optional object where to store the position of the field in the formatted text,
or <code>null</code> if this information is not wanted. This field position shall be
created with one of the <a href="AngleFormat.Field.html" title="class in org.apache.sis.measure"><code>Angle­Format​.Field</code></a> constants.</dd>
<dt>Returns:</dt>
<dd>the <code>to­Append­To</code> buffer, returned for method calls chaining.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">Illegal­Argument­Exception</a></code> - if <code>value</code> if not an instance of <a href="Angle.html" title="class in org.apache.sis.measure"><code>Angle</code></a>.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="formatToCharacterIterator(java.lang.Object)">
<h3>formatToCharacterIterator</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/text/AttributedCharacterIterator.html" title="class or interface in java.text" class="external-link">AttributedCharacterIterator</a></span>&nbsp;<span class="element-name">formatToCharacterIterator</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;value)</span></div>
<div class="block">Formats an angle, latitude or longitude value as an attributed character iterator.
Callers can iterate and queries the attribute values as in the following example:
<blockquote><pre>AttributedCharacterIterator it = angleFormat.<b>formatToCharacterIterator</b>(myAngle);
<font color="green">for</font> (<font color="green">char</font> c=it.<b>first</b>(); c!=AttributedCharacterIterator.DONE; c=c.<b>next</b>()) {
<i><font color="gray">// 'c' is a character from the formatted string.</font></i>
<font color="green">if</font> (it.<b>getAttribute</b>(AngleFormat.Field.MINUTES) != <font color="green">null</font>) {
<i><font color="gray">// If we enter this block, then the character 'c' is part of the minutes field,</font></i>
<i><font color="gray">// This field extends from it.getRunStart(MINUTES) to it.getRunLimit(MINUTES).</font></i>
}
}</pre></blockquote>
Alternatively, if the current <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/text/CharacterIterator.html#getIndex()" title="class or interface in java.text" class="external-link">iterator
index</a> is before the start of the minutes field, then the starting position of that field
can be obtained directly by <code>it​.get­Run­Limit(MINUTES)</code>. If the current iterator index
is inside the minutes field, then the above method call will rather returns the end of that
field. The same strategy works for other all fields too.
<p>The returned character iterator contains all <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/text/NumberFormat.Field.html" title="class or interface in java.text" class="external-link"><code>Number­Format​.Field</code></a>
attributes in addition to the <a href="AngleFormat.Field.html" title="class in org.apache.sis.measure"><code>Angle­Format​.Field</code></a> ones. Consequently, the same character may
have more than one attribute. For example, when formatting 45°30′15.0″N, then:</p>
<ul>
<li>The <code>45°</code> part has the <a href="AngleFormat.Field.html#DEGREES"><code>Angle­Format​.Field​.DEGREES</code></a> attribute.</li>
<li>The <code>30′</code> part has the <a href="AngleFormat.Field.html#MINUTES"><code>Angle­Format​.Field​.MINUTES</code></a> attribute.</li>
<li>The <code>15.0″</code> part has the <a href="AngleFormat.Field.html#SECONDS"><code>Angle­Format​.Field​.SECONDS</code></a> attribute.</li>
<li>The <code>N</code> part has the <a href="AngleFormat.Field.html#HEMISPHERE"><code>Angle­Format​.Field​.HEMISPHERE</code></a> attribute.</li>
<li>The <code>45</code>, <code>30</code> and <code>15</code> parts have the
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/text/NumberFormat.Field.html#INTEGER" title="class or interface in java.text" class="external-link"><code>Number­Format​.Field​.INTEGER</code></a> attribute.</li>
<li>The <code>.</code> part has the <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/text/NumberFormat.Field.html#DECIMAL_SEPARATOR" title="class or interface in java.text" class="external-link"><code>Number­Format​.Field​.DECIMAL_SEPARATOR</code></a> attribute.</li>
<li>The last <code>0</code> part has the <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/text/NumberFormat.Field.html#FRACTION" title="class or interface in java.text" class="external-link"><code>Number­Format​.Field​.FRACTION</code></a> attribute.</li>
</ul>
In Apache SIS implementation, the returned character iterator also implements the
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/CharSequence.html" title="class or interface in java.lang" class="external-link"><code>Char­Sequence</code></a> interface for convenience.</div>
<dl class="notes">
<dt>Overrides:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/text/Format.html#formatToCharacterIterator(java.lang.Object)" title="class or interface in java.text" class="external-link">format­To­Character­Iterator</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/text/Format.html" title="class or interface in java.text" class="external-link">Format</a></code></dd>
<dt>Parameters:</dt>
<dd><code>value</code> - the <a href="Angle.html" title="class in org.apache.sis.measure"><code>Angle</code></a> object to format.</dd>
<dt>Returns:</dt>
<dd>a character iterator together with the attributes describing the formatted value.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">Illegal­Argument­Exception</a></code> - if <code>value</code> if not an instance of <a href="Angle.html" title="class in org.apache.sis.measure"><code>Angle</code></a>.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="parse(java.lang.String,java.text.ParsePosition)">
<h3>parse</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="Angle.html" title="class in org.apache.sis.measure">Angle</a></span>&nbsp;<span class="element-name">parse</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;source,
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/text/ParsePosition.html" title="class or interface in java.text" class="external-link">ParsePosition</a>&nbsp;pos)</span></div>
<div class="block">Parses the given string as an angle. This method can parse the string even if it is not
strictly compliant to the expected pattern. For example if <a href="#isFallbackAllowed()"><code>is­Fallback­Allowed()</code></a>
is <code>true</code>, then this method will parse "<code>48°12.34'</code>" correctly even if the
expected pattern was "<code>DDMM​.mm</code>" (i.e. the string should have been "<code>4812.34</code>").
<p>If the given string ends with a "N" or "S" hemisphere symbol, then this method returns
an instance of <a href="Latitude.html" title="class in org.apache.sis.measure"><code>Latitude</code></a>. Otherwise if the string ends with a "E" or "W" symbol,
then this method returns an instance of <a href="Longitude.html" title="class in org.apache.sis.measure"><code>Longitude</code></a>. Otherwise this method returns
an instance of <a href="Angle.html" title="class in org.apache.sis.measure"><code>Angle</code></a>.</p>
<p>This method is stricter than the <a href="#parse(java.lang.String)"><code>parse(String)</code></a> method regarding whitespaces
between the degrees, minutes and seconds fields. This is because whitespaces could be
used as a separator for other kinds of values. If the string is known to contain only
an angle value, use <code>parse(String)</code> instead.</p></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>source</code> - the string to parse.</dd>
<dd><code>pos</code> - on input, index of the first <code>source</code> character to read.
On output, index after the last parsed character.</dd>
<dt>Returns:</dt>
<dd>the parsed string as an <a href="Angle.html" title="class in org.apache.sis.measure"><code>Angle</code></a>, <a href="Latitude.html" title="class in org.apache.sis.measure"><code>Latitude</code></a> or <a href="Longitude.html" title="class in org.apache.sis.measure"><code>Longitude</code></a> object.</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="#isFallbackAllowed()"><code>is­Fallback­Allowed()</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="parse(java.lang.String)">
<h3>parse</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="Angle.html" title="class in org.apache.sis.measure">Angle</a></span>&nbsp;<span class="element-name">parse</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;source)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/text/ParseException.html" title="class or interface in java.text" class="external-link">ParseException</a></span></div>
<div class="block">Parses the given string as an angle. This full string is expected to represents an
angle value. This assumption allows <code>parse(String)</code> to be more tolerant than
<a href="#parse(java.lang.String,java.text.ParsePosition)"><code>parse(String, Parse­Position)</code></a> regarding white spaces between degrees, minutes
and seconds fields.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>source</code> - the string to parse.</dd>
<dt>Returns:</dt>
<dd>the parsed string as an <a href="Angle.html" title="class in org.apache.sis.measure"><code>Angle</code></a>, <a href="Latitude.html" title="class in org.apache.sis.measure"><code>Latitude</code></a> or <a href="Longitude.html" title="class in org.apache.sis.measure"><code>Longitude</code></a> object.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/text/ParseException.html" title="class or interface in java.text" class="external-link">Parse­Exception</a></code> - if the string cannot be fully parsed.</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="#isFallbackAllowed()"><code>is­Fallback­Allowed()</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="parseObject(java.lang.String,java.text.ParsePosition)">
<h3>parseObject</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span>&nbsp;<span class="element-name">parseObject</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;source,
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/text/ParsePosition.html" title="class or interface in java.text" class="external-link">ParsePosition</a>&nbsp;pos)</span></div>
<div class="block">Parses a substring as an object.
The default implementation delegates to <a href="#parse(java.lang.String,java.text.ParsePosition)"><code>parse(String, Parse­Position)</code></a>.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/text/Format.html#parseObject(java.lang.String,java.text.ParsePosition)" title="class or interface in java.text" class="external-link">parse­Object</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/text/Format.html" title="class or interface in java.text" class="external-link">Format</a></code></dd>
<dt>Parameters:</dt>
<dd><code>source</code> - the string to parse.</dd>
<dd><code>pos</code> - the position where to start parsing.</dd>
<dt>Returns:</dt>
<dd>the parsed string as an <a href="Angle.html" title="class in org.apache.sis.measure"><code>Angle</code></a>, <a href="Latitude.html" title="class in org.apache.sis.measure"><code>Latitude</code></a> or <a href="Longitude.html" title="class in org.apache.sis.measure"><code>Longitude</code></a> object.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="parseObject(java.lang.String)">
<h3>parseObject</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span>&nbsp;<span class="element-name">parseObject</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;source)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/text/ParseException.html" title="class or interface in java.text" class="external-link">ParseException</a></span></div>
<div class="block">Parses the given string as an object.
The default implementation delegates to <a href="#parse(java.lang.String)"><code>parse(String)</code></a>.</div>
<dl class="notes">
<dt>Overrides:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/text/Format.html#parseObject(java.lang.String)" title="class or interface in java.text" class="external-link">parse­Object</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/text/Format.html" title="class or interface in java.text" class="external-link">Format</a></code></dd>
<dt>Parameters:</dt>
<dd><code>source</code> - the string to parse.</dd>
<dt>Returns:</dt>
<dd>the parsed string as an <a href="Angle.html" title="class in org.apache.sis.measure"><code>Angle</code></a>, <a href="Latitude.html" title="class in org.apache.sis.measure"><code>Latitude</code></a> or <a href="Longitude.html" title="class in org.apache.sis.measure"><code>Longitude</code></a> object.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/text/ParseException.html" title="class or interface in java.text" class="external-link">Parse­Exception</a></code> - if the string cannot be fully parsed.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="isFallbackAllowed()">
<h3>isFallbackAllowed</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">isFallbackAllowed</span>()</div>
<div class="block">Returns <code>true</code> if the <a href="#parse(java.lang.String,java.text.ParsePosition)"><code>parse</code></a> methods are allowed
to fallback on the build-in default symbols if the string to parse doesn't match the
<a href="#applyPattern(java.lang.String)">applied pattern</a>.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd><code>true</code> if the ASCII quote characters are allowed at parsing time.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setFallbackAllowed(boolean)">
<h3>setFallbackAllowed</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setFallbackAllowed</span><wbr><span class="parameters">(boolean&nbsp;allowed)</span></div>
<div class="block">Sets whether the <a href="#parse(java.lang.String,java.text.ParsePosition)"><code>parse</code></a> methods are allowed to
fallback on the build-in default symbols if the string to parse doesn't match the
<a href="#applyPattern(java.lang.String)">applied pattern</a>. The build-in fallback is:
<ul>
<li><code>°</code> (an extended-ASCII character) or space (in <a href="#parse(java.lang.String)"><code>parse(String)</code></a> method only) for degrees.</li>
<li><code>'</code> (an ASCII character) or <code></code> (the default Unicode character) for minutes.</li>
<li><code>"</code> (an ASCII character) or <code></code> (the default Unicode character) for seconds.</li>
</ul>
The default value is <code>true</code>, because many end-users will not enter the Unicode
<code></code> and <code></code> symbols. However, developers may need to set this flag to
<code>false</code> if those ASCII symbols are used in a wider context (for example the
<code>"</code> character for quoting strings).</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>allowed</code> - <code>true</code> if the ASCII quote characters are allowed at parsing time.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getLocale()">
<h3>getLocale</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/Locale.html" title="class or interface in java.util" class="external-link">Locale</a></span>&nbsp;<span class="element-name">getLocale</span>()</div>
<div class="block">Returns this formatter locale. This is the locale specified at construction time if any,
or the <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/Locale.html#getDefault()" title="class or interface in java.util" class="external-link">default locale</a> at construction time otherwise.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../util/Localized.html#getLocale()">get­Locale</a></code>&nbsp;in interface&nbsp;<code><a href="../util/Localized.html" title="interface in org.apache.sis.util">Localized</a></code></dd>
<dt>Returns:</dt>
<dd>this formatter locale (never <code>null</code>).</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="clone()">
<h3>clone</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="AngleFormat.html" title="class in org.apache.sis.measure">AngleFormat</a></span>&nbsp;<span class="element-name">clone</span>()</div>
<div class="block">Returns a clone of this <code>Angle­Format</code>.</div>
<dl class="notes">
<dt>Overrides:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/text/Format.html#clone()" title="class or interface in java.text" class="external-link">clone</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/text/Format.html" title="class or interface in java.text" class="external-link">Format</a></code></dd>
<dt>Returns:</dt>
<dd>a clone of this format.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="hashCode()">
<h3>hashCode</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">hashCode</span>()</div>
<div class="block">Returns a "hash value" for this object.</div>
<dl class="notes">
<dt>Overrides:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link">hash­Code</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="equals(java.lang.Object)">
<h3>equals</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">equals</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;object)</span></div>
<div class="block">Compares this format with the specified object for equality.</div>
<dl class="notes">
<dt>Overrides:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link">equals</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></code></dd>
<dt>Parameters:</dt>
<dd><code>object</code> - the object to compare with this angle format for equality.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="toString()">
<h3>toString</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name">toString</span>()</div>
<div class="block">Returns a string representation of this object for debugging purpose.</div>
<dl class="notes">
<dt>Overrides:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#toString()" title="class or interface in java.lang" class="external-link">to­String</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></code></dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
<footer role="contentinfo">
<hr>
<p class="legal-copy"><small>Copyright &#169; 2010&#x2013;2022 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</div>
</div>
</body>
</html>