blob: f67585f7d29cca716c034e69bee4f4f25f759e74 [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>CompoundFormat (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.io.CompoundFormat class">
<meta name="keywords" content="getLocale()">
<meta name="keywords" content="getTimeZone()">
<meta name="keywords" content="getValueType()">
<meta name="keywords" content="parse()">
<meta name="keywords" content="parseObject()">
<meta name="keywords" content="format()">
<meta name="keywords" content="getFormat()">
<meta name="keywords" content="createFormat()">
<meta name="keywords" content="clone()">
<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="CompoundFormat (Apache SIS 1.0 API)";
}
}
catch(err) {
}
//-->
var data = {"i0":10,"i1":10,"i2":10,"i3":6,"i4":10,"i5":10,"i6":10,"i7":10,"i8":6,"i9":6,"i10":10,"i11":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract 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/CompoundFormat.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><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="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.io</a></div>
<h2 title="Class CompoundFormat" class="title">Class CompoundFormat&lt;T&gt;</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/text/Format.html?is-external=true" title="class or interface in java.text" class="externalLink">Format</a></li>
<li>
<ul class="inheritance">
<li>CompoundFormat&lt;T&gt;</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the base type of objects parsed and formatted by this class.</dd>
</dl>
<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/Localized.html" title="interface in org.apache.sis.util">Localized</a></code></dd>
</dl>
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><code><a href="../geometry/CoordinateFormat.html" title="class in org.apache.sis.geometry">Coordinate­Format</a></code>, <code><a href="TabularFormat.html" title="class in org.apache.sis.io">Tabular­Format</a></code>, <code><a href="wkt/WKTFormat.html" title="class in org.apache.sis.io.wkt">WKTFormat</a></code></dd>
</dl>
<hr>
<pre>public abstract class <span class="typeNameLabel">CompoundFormat&lt;T&gt;</span>
extends <a href="https://docs.oracle.com/javase/8/docs/api/java/text/Format.html?is-external=true" title="class or interface in java.text" class="externalLink">Format</a>
implements <a href="../util/Localized.html" title="interface in org.apache.sis.util">Localized</a></pre>
<div class="block">Base class of <a href="https://docs.oracle.com/javase/8/docs/api/java/text/Format.html?is-external=true" title="class or interface in java.text" class="externalLink"><code>Format</code></a> implementations which delegate part of their work to other
<code>Format</code> instances. <code>Compound­Format</code> subclasses typically work on relatively
large blocks of data, for example a metadata tree or a <cite>Well Known Text</cite> (WKT).
Those blocks of data usually contain smaller elements like numbers and dates, whose parsing
and formatting can be delegated to <a href="https://docs.oracle.com/javase/8/docs/api/java/text/NumberFormat.html?is-external=true" title="class or interface in java.text" class="externalLink"><code>Number­Format</code></a> and <a href="https://docs.oracle.com/javase/8/docs/api/java/text/DateFormat.html?is-external=true" title="class or interface in java.text" class="externalLink"><code>Date­Format</code></a> respectively.
Subclasses can obtain instances of those formats by call to <a href="#getFormat(java.lang.Class)"><code>get­Format(Class)</code></a> where
the argument is the type of the value to parse or format.
<code>Compound­Format</code> supports at least the following value types, but subclasses may add more types:
<table class="sis">
<caption>Supported value types</caption>
<tr><th>Value type</th> <th>Format type</th> <th>Remarks</th></tr>
<tr><td><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/DirectPosition.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink"><code>DirectPosition</code></a></td> <td><a href="../geometry/CoordinateFormat.html" title="class in org.apache.sis.geometry"><code>CoordinateFormat</code></a></td> <td>Requires <code>sis-referencing</code> module.</td></tr>
<tr><td><a href="../measure/Angle.html" title="class in org.apache.sis.measure"><code>Angle</code></a></td> <td><a href="../measure/AngleFormat.html" title="class in org.apache.sis.measure"><code>AngleFormat</code></a></td> <td></td></tr>
<tr><td><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util" class="externalLink"><code>Date</code></a></td> <td><a href="https://docs.oracle.com/javase/8/docs/api/java/text/DateFormat.html?is-external=true" title="class or interface in java.text" class="externalLink"><code>DateFormat</code></a></td> <td>Timezone specified by <a href="#getTimeZone()"><code>get­Time­Zone()</code></a>.</td></tr>
<tr><td><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></td> <td><a href="https://docs.oracle.com/javase/8/docs/api/java/text/NumberFormat.html?is-external=true" title="class or interface in java.text" class="externalLink"><code>NumberFormat</code></a></td> <td></td></tr>
<tr><td><a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/Unit.html?is-external=true" title="class or interface in javax.measure" class="externalLink"><code>Unit</code></a></td> <td><a href="../measure/UnitFormat.html" title="class in org.apache.sis.measure"><code>UnitFormat</code></a></td> <td></td></tr>
<tr><td><a href="../measure/Range.html" title="class in org.apache.sis.measure"><code>Range</code></a></td> <td><a href="../measure/RangeFormat.html" title="class in org.apache.sis.measure"><code>RangeFormat</code></a></td> <td></td></tr>
<tr><td><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Class</code></a></td> <td>(internal)</td> <td></td></tr>
</table>
<div class="section">Sources and destinations</div>
Since <code>Compound­Format</code> may work on larger texts than the usual <code>Format</code> classes,
it defines <code>parse</code> and <code>format</code> methods working with arbitrary <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Char­Sequence</code></a>
and <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Appendable</code></a> instances. The standard <code>Format</code> methods redirect to the above-cited
methods.
<div class="section">Sub-classing</div>
The abstract methods to be defined by subclasses are:
<ul>
<li><a href="#getValueType()"><code>get­Value­Type()</code></a></li>
<li><a href="#format(T,java.lang.Appendable)"><code>format(Object, Appendable)</code></a></li>
<li><a href="#parse(java.lang.CharSequence,java.text.ParsePosition)"><code>parse(Char­Sequence, Parse­Position)</code></a></li>
</ul>
<div class="note"><b>API note:</b>
in the standard <a href="https://docs.oracle.com/javase/8/docs/api/java/text/Format.html?is-external=true" title="class or interface in java.text" class="externalLink"><code>Format</code></a> class, the <code>parse</code> methods either accept a <a href="https://docs.oracle.com/javase/8/docs/api/java/text/ParsePosition.html?is-external=true" title="class or interface in java.text" class="externalLink"><code>Parse­Position</code></a> argument
and returns <code>null</code> on error, or does not take position argument and throws a <a href="https://docs.oracle.com/javase/8/docs/api/java/text/ParseException.html?is-external=true" title="class or interface in java.text" class="externalLink"><code>Parse­Exception</code></a> on error.
In this <code>Compound­Format</code> class, the <code>parse</code> method both takes a <code>Parse­Position</code> argument and
throws a <code>Parse­Exception</code> on error. This allows both substring parsing and more accurate exception message
in case of error.</div></div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>0.3</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../serialized-form.html#org.apache.sis.io.CompoundFormat">Serialized Form</a></dd>
<p><font size="-1">Defined in the <code>sis-utility</code> module</font></p>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<ul class="blockList">
<li class="blockList"><a id="nested.classes.inherited.from.class.java.text.Format">
<!-- -->
</a>
<h3>Nested classes/interfaces inherited from class&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/text/Format.html?is-external=true" title="class or interface in java.text" class="externalLink">Format</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/text/Format.Field.html?is-external=true" title="class or interface in java.text" class="externalLink">Format​.Field</a></code></li>
</ul>
</li>
</ul>
</section>
<!-- ======== 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">Modifier</th>
<th class="colSecond" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected </code></td>
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(java.util.Locale,java.util.TimeZone)">CompoundFormat</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util" class="externalLink">Locale</a>&nbsp;locale,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/TimeZone.html?is-external=true" title="class or interface in java.util" class="externalLink">TimeZone</a>&nbsp;timezone)</code></th>
<td class="colLast">
<div class="block">Creates a new format for the given locale.</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="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract 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><a href="CompoundFormat.html" title="class in org.apache.sis.io">CompoundFormat</a>&lt;<a href="CompoundFormat.html" title="type parameter in CompoundFormat">T</a>&gt;</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 clone of this format.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/text/Format.html?is-external=true" title="class or interface in java.text" class="externalLink">Format</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createFormat(java.lang.Class)">createFormat</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a>&lt;?&gt;&nbsp;valueType)</code></th>
<td class="colLast">
<div class="block">Creates a new format to use for parsing and formatting values of the given type.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/StringBuffer.html?is-external=true" title="class or interface in java.lang" class="externalLink">StringBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#format(java.lang.Object,java.lang.StringBuffer,java.text.FieldPosition)">format</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,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/StringBuffer.html?is-external=true" title="class or interface in java.lang" class="externalLink">StringBuffer</a>&nbsp;toAppendTo,
<a href="https://docs.oracle.com/javase/8/docs/api/java/text/FieldPosition.html?is-external=true" title="class or interface in java.text" class="externalLink">FieldPosition</a>&nbsp;pos)</code></th>
<td class="colLast">
<div class="block">Writes a textual representation of the specified object in the given buffer.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>abstract void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#format(T,java.lang.Appendable)">format</a></span>&#8203;(<a href="CompoundFormat.html" title="type parameter in CompoundFormat">T</a>&nbsp;object,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Appendable</a>&nbsp;toAppendTo)</code></th>
<td class="colLast">
<div class="block">Writes a textual representation of the given object in the given stream or buffer.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/text/Format.html?is-external=true" title="class or interface in java.text" class="externalLink">Format</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getFormat(java.lang.Class)">getFormat</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a>&lt;?&gt;&nbsp;valueType)</code></th>
<td class="colLast">
<div class="block">Returns the format to use for parsing and formatting values of the given type.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util" class="externalLink">Locale</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getLocale()">getLocale</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the locale used by this format.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util" class="externalLink">Locale</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getLocale(java.util.Locale.Category)">getLocale</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Locale.Category.html?is-external=true" title="class or interface in java.util" class="externalLink">Locale.Category</a>&nbsp;category)</code></th>
<td class="colLast">
<div class="block">Returns the locale for the given category.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/TimeZone.html?is-external=true" title="class or interface in java.util" class="externalLink">TimeZone</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getTimeZone()">getTimeZone</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the timezone used by this format.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>abstract <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a>&lt;? extends <a href="CompoundFormat.html" title="type parameter in CompoundFormat">T</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getValueType()">getValueType</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the base type of values parsed and formatted by this <code>Format</code> instance.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>abstract <a href="CompoundFormat.html" title="type parameter in CompoundFormat">T</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#parse(java.lang.CharSequence,java.text.ParsePosition)">parse</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang" class="externalLink">CharSequence</a>&nbsp;text,
<a href="https://docs.oracle.com/javase/8/docs/api/java/text/ParsePosition.html?is-external=true" title="class or interface in java.text" class="externalLink">ParsePosition</a>&nbsp;pos)</code></th>
<td class="colLast">
<div class="block">Creates an object from the given character sequence.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code><a href="CompoundFormat.html" title="type parameter in CompoundFormat">T</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#parseObject(java.lang.String)">parseObject</a></span>&#8203;(<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;text)</code></th>
<td class="colLast">
<div class="block">Creates an object from the given string representation.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code><a href="CompoundFormat.html" title="type parameter in CompoundFormat">T</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#parseObject(java.lang.String,java.text.ParsePosition)">parseObject</a></span>&#8203;(<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;text,
<a href="https://docs.oracle.com/javase/8/docs/api/java/text/ParsePosition.html?is-external=true" title="class or interface in java.text" class="externalLink">ParsePosition</a>&nbsp;pos)</code></th>
<td class="colLast">
<div class="block">Creates an object from the given string representation, or returns <code>null</code> if an error
occurred while parsing.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.Format">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/text/Format.html?is-external=true" title="class or interface in java.text" class="externalLink">Format</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/text/Format.html?is-external=true#format(java.lang.Object)" title="class or interface in java.text" class="externalLink">format</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/text/Format.html?is-external=true#formatToCharacterIterator(java.lang.Object)" title="class or interface in java.text" class="externalLink">format­To­Character­Iterator</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#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">get­Class</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hash­Code</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notify­All</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">to­String</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink">wait</a></code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= 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;(java.util.Locale,java.util.TimeZone)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>CompoundFormat</h4>
<pre>protected&nbsp;CompoundFormat&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util" class="externalLink">Locale</a>&nbsp;locale,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/TimeZone.html?is-external=true" title="class or interface in java.util" class="externalLink">TimeZone</a>&nbsp;timezone)</pre>
<div class="block">Creates a new format for the given locale. The given locale can be <code>null</code> or
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html?is-external=true#ROOT" title="class or interface in java.util" class="externalLink"><code>Locale​.ROOT</code></a> if this format shall parse and format "unlocalized" strings.
See <a href="#getLocale()"><code>get­Locale()</code></a> for more information about the <code>ROOT</code> locale.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>locale</code> - the locale for the new <code>Format</code>, or <code>null</code> for <code>Locale​.ROOT</code>.</dd>
<dd><code>timezone</code> - the timezone, or <code>null</code> for UTC.</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="getLocale()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLocale</h4>
<pre class="methodSignature">public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util" class="externalLink">Locale</a>&nbsp;getLocale()</pre>
<div class="block">Returns the locale used by this format. The returned value may be <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html?is-external=true#ROOT" title="class or interface in java.util" class="externalLink"><code>Locale​.ROOT</code></a>
if this format does not apply any localization. The definition of "unlocalized string"
is implementation-dependent, but some typical examples are:
<ul>
<li>Format <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> instances using <code>to­String()</code> instead than <code>Number­Format</code>.</li>
<li>Format <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util" class="externalLink"><code>Date</code></a> instances using the ISO pattern instead than the English one.</li>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></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><span class="returnLabel">Returns:</span></dt>
<dd>the locale of this <code>Format</code>, or <code>Locale​.ROOT</code> for unlocalized format.</dd>
</dl>
</li>
</ul>
<a id="getLocale(java.util.Locale.Category)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLocale</h4>
<pre class="methodSignature">public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util" class="externalLink">Locale</a>&nbsp;getLocale&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Locale.Category.html?is-external=true" title="class or interface in java.util" class="externalLink">Locale.Category</a>&nbsp;category)</pre>
<div class="block">Returns the locale for the given category. Subclasses may override this method in order to assign
different roles to the different locale categories. A typical (but not mandatory) mapping is:
<ul>
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Locale.Category.html?is-external=true#FORMAT" title="class or interface in java.util" class="externalLink"><code>Locale​.Category​.FORMAT</code></a> specifies the locale to use for numbers, dates and angles formatting.</li>
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Locale.Category.html?is-external=true#DISPLAY" title="class or interface in java.util" class="externalLink"><code>Locale​.Category​.DISPLAY</code></a> specifies the locale to use for <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/CodeList.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink"><code>Code­List</code></a> labels
and <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/InternationalString.html?is-external=true" title="class or interface in org.opengis.util" class="externalLink"><code>International­String</code></a> contents.</li>
</ul>
<div class="note"><b>Example:</b>
The ISO 19162 (<cite>Well Known Text</cite>) standard requires a number format similar to the one defined by
<code>Locale​.ROOT</code> while it allows informative texts (remarks, <i>etc.</i>) to be formatted according the
user's locale. Consequently <code>WKTFormat</code> fixes (usually) the locale for <code>Category​.FORMAT</code> to
<code>Locale​.ROOT</code> and let <code>Category​.DISPLAY</code> be any locale.</div>
For subclasses that do not override this method, the default implementation returns <a href="#getLocale()"><code>get­Locale()</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>category</code> - the category for which a locale is desired.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the locale for the given category (never <code>null</code>).</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>0.4</dd>
</dl>
</li>
</ul>
<a id="getTimeZone()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTimeZone</h4>
<pre class="methodSignature">public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/TimeZone.html?is-external=true" title="class or interface in java.util" class="externalLink">TimeZone</a>&nbsp;getTimeZone()</pre>
<div class="block">Returns the timezone used by this format.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the timezone used for this format, or UTC for unlocalized format.</dd>
</dl>
</li>
</ul>
<a id="getValueType()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getValueType</h4>
<pre class="methodSignature">public abstract&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a>&lt;? extends <a href="CompoundFormat.html" title="type parameter in CompoundFormat">T</a>&gt;&nbsp;getValueType()</pre>
<div class="block">Returns the base type of values parsed and formatted by this <code>Format</code> instance.
The returned type may be a subclass of <code>&lt;T&gt;</code> if the format is configured in a way
that restrict the kind value to be parsed.
<div class="note"><b>Example:</b>
<ul>
<li><code>Statistics­Format</code> unconditionally returns <code>Statistics​.class</code>.</li>
<li><code>Tree­Table­Format</code> unconditionally returns <code>Tree­Table​.class</code>.</li>
</ul>
</div></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the base type of values parsed and formatted by this <code>Format</code> instance.</dd>
</dl>
</li>
</ul>
<a id="parse(java.lang.CharSequence,java.text.ParsePosition)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>parse</h4>
<pre class="methodSignature">public abstract&nbsp;<a href="CompoundFormat.html" title="type parameter in CompoundFormat">T</a>&nbsp;parse&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang" class="externalLink">CharSequence</a>&nbsp;text,
<a href="https://docs.oracle.com/javase/8/docs/api/java/text/ParsePosition.html?is-external=true" title="class or interface in java.text" class="externalLink">ParsePosition</a>&nbsp;pos)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/text/ParseException.html?is-external=true" title="class or interface in java.text" class="externalLink">ParseException</a></pre>
<div class="block">Creates an object from the given character sequence.
The parsing begins at the index given by the <code>pos</code> argument.
If parsing succeeds, then:
<ul>
<li>The <code>pos</code> <a href="https://docs.oracle.com/javase/8/docs/api/java/text/ParsePosition.html?is-external=true#getIndex()" title="class or interface in java.text" class="externalLink">index</a> is updated to the index
after the last successfully parsed character.</li>
<li>The parsed object is returned.</li>
</ul>
If parsing fails, then:
<ul>
<li>The <code>pos</code> index is left unchanged</li>
<li>The <code>pos</code> <a href="https://docs.oracle.com/javase/8/docs/api/java/text/ParsePosition.html?is-external=true#getErrorIndex()" title="class or interface in java.text" class="externalLink">error index</a>
is set to the beginning of the unparsable character sequence.</li>
<li>One of the following actions is taken (at implementation choice):
<ul>
<li>this method returns <code>null</code>, or</li>
<li>a <code>Parse­Exception</code> is thrown with an <a href="https://docs.oracle.com/javase/8/docs/api/java/text/ParseException.html?is-external=true#getErrorOffset()" title="class or interface in java.text" class="externalLink">error offset</a>
set to the index of the first unparsable character.</li>
</ul>
</li>
</ul>
<div class="note"><b>Note:</b>
if a <code>Parse­Exception</code> is thrown, its error offset is usually the same than the <code>Parse­Position</code>
error index, but implementations are free to adopt a slightly different policy. For example
if parsing of the <code>"30.0 40,0"</code> coordinate fails on the coma in the last number, then the <code>pos</code>
<a href="https://docs.oracle.com/javase/8/docs/api/java/text/ParsePosition.html?is-external=true#getErrorIndex()" title="class or interface in java.text" class="externalLink">error index</a> may be set to 5 (the beginning of the <code>"40.0"</code>
character sequence) or to 7 (the coma position), depending on the implementation.</div>
Most implementations never return <code>null</code>. However some implementations may choose to return <code>null</code>
if they can determine that the given text is not a supported format and reserve <code>Parse­Exception</code> for the
cases where the text seems to be the expected format but contains a malformed element.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>text</code> - the character sequence for the object to parse.</dd>
<dd><code>pos</code> - the position where to start the parsing.
On return, the position where the parsing stopped or where an error occurred.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the parsed object, or <code>null</code> if the text is not recognized.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/text/ParseException.html?is-external=true" title="class or interface in java.text" class="externalLink">Parse­Exception</a></code> - if an error occurred while parsing the object.</dd>
</dl>
</li>
</ul>
<a id="parseObject(java.lang.String,java.text.ParsePosition)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>parseObject</h4>
<pre class="methodSignature">public&nbsp;<a href="CompoundFormat.html" title="type parameter in CompoundFormat">T</a>&nbsp;parseObject&#8203;(<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;text,
<a href="https://docs.oracle.com/javase/8/docs/api/java/text/ParsePosition.html?is-external=true" title="class or interface in java.text" class="externalLink">ParsePosition</a>&nbsp;pos)</pre>
<div class="block">Creates an object from the given string representation, or returns <code>null</code> if an error
occurred while parsing. The parsing begins at the index given by the <code>pos</code> argument.
If parsing succeeds, then:
<ul>
<li>The <code>pos</code> <a href="https://docs.oracle.com/javase/8/docs/api/java/text/ParsePosition.html?is-external=true#getIndex()" title="class or interface in java.text" class="externalLink">index</a> is updated to the index
after the last successfully parsed character.</li>
<li>The parsed object is returned.</li>
</ul>
If parsing fails, then:
<ul>
<li>The <code>pos</code> index is left unchanged</li>
<li>The <code>pos</code> <a href="https://docs.oracle.com/javase/8/docs/api/java/text/ParsePosition.html?is-external=true#getErrorIndex()" title="class or interface in java.text" class="externalLink">error index</a>
is set to the index of the character where the error occurred.</li>
<li><code>null</code> is returned.</li>
</ul>
The default implementation delegates to <a href="#parse(java.lang.CharSequence,java.text.ParsePosition)"><code>parse(Char­Sequence, Parse­Position)</code></a>.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/text/Format.html?is-external=true#parseObject(java.lang.String,java.text.ParsePosition)" title="class or interface in java.text" class="externalLink">parse­Object</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/text/Format.html?is-external=true" title="class or interface in java.text" class="externalLink">Format</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>text</code> - the string representation of the object to parse.</dd>
<dd><code>pos</code> - the position where to start the parsing.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the parsed object, or <code>null</code> if the given string can not be parsed.</dd>
</dl>
</li>
</ul>
<a id="parseObject(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>parseObject</h4>
<pre class="methodSignature">public&nbsp;<a href="CompoundFormat.html" title="type parameter in CompoundFormat">T</a>&nbsp;parseObject&#8203;(<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;text)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/text/ParseException.html?is-external=true" title="class or interface in java.text" class="externalLink">ParseException</a></pre>
<div class="block">Creates an object from the given string representation.
The default implementation delegates to <a href="#parse(java.lang.CharSequence,java.text.ParsePosition)"><code>parse(Char­Sequence, Parse­Position)</code></a>
and ensures that the given string has been fully used, ignoring trailing
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Character.html?is-external=true#isSpaceChar(int)" title="class or interface in java.lang" class="externalLink">spaces</a> and
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Character.html?is-external=true#isISOControl(int)" title="class or interface in java.lang" class="externalLink">ISO control characters</a>.
<div class="note"><b>Note:</b>
The usual SIS policy, as documented in the <a href="../util/CharSequences.html" title="class in org.apache.sis.util"><code>Char­Sequences</code></a> class, is to test for
whitespaces using the <code>Character​.is­Whitespace(…)</code> method. The combination of <code>is­Space­Char(…)</code>
and <code>is­ISOControl(…)</code> done in this <code>parse­Object(…)</code> method is more permissive since it encompasses
all whitespace characters, plus non-breaking spaces and non-white ISO controls.</div></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/text/Format.html?is-external=true#parseObject(java.lang.String)" title="class or interface in java.text" class="externalLink">parse­Object</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/text/Format.html?is-external=true" title="class or interface in java.text" class="externalLink">Format</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>text</code> - the string representation of the object to parse.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the parsed object.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/text/ParseException.html?is-external=true" title="class or interface in java.text" class="externalLink">Parse­Exception</a></code> - if an error occurred while parsing the object.</dd>
</dl>
</li>
</ul>
<a id="format(java.lang.Object,java.lang.Appendable)">
<!-- -->
</a><a id="format(T,java.lang.Appendable)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>format</h4>
<pre class="methodSignature">public abstract&nbsp;void&nbsp;format&#8203;(<a href="CompoundFormat.html" title="type parameter in CompoundFormat">T</a>&nbsp;object,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Appendable</a>&nbsp;toAppendTo)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io" class="externalLink">IOException</a></pre>
<div class="block">Writes a textual representation of the given object in the given stream or buffer.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>object</code> - the object to format.</dd>
<dd><code>to­Append­To</code> - where to format the object.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io" class="externalLink">IOException</a></code> - if an error occurred while writing to the given appendable.</dd>
</dl>
</li>
</ul>
<a id="format(java.lang.Object,java.lang.StringBuffer,java.text.FieldPosition)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>format</h4>
<pre class="methodSignature">public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/StringBuffer.html?is-external=true" title="class or interface in java.lang" class="externalLink">StringBuffer</a>&nbsp;format&#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,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/StringBuffer.html?is-external=true" title="class or interface in java.lang" class="externalLink">StringBuffer</a>&nbsp;toAppendTo,
<a href="https://docs.oracle.com/javase/8/docs/api/java/text/FieldPosition.html?is-external=true" title="class or interface in java.text" class="externalLink">FieldPosition</a>&nbsp;pos)</pre>
<div class="block">Writes a textual representation of the specified object in the given buffer.
This method delegates its work to <a href="#format(T,java.lang.Appendable)"><code>format(Object, Appendable)</code></a>, but
without propagating <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io" class="externalLink"><code>IOException</code></a>. The I/O exception should never
occur since we are writing in a <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/StringBuffer.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>String­Buffer</code></a>.
<div class="note"><b>Note:</b>
Strictly speaking, an <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io" class="externalLink"><code>IOException</code></a> could still occur if a subclass overrides the above <code>format</code>
method and performs some I/O operation outside the given <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/StringBuffer.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>String­Buffer</code></a>. However this is not the intended
usage of this class and implementers should avoid such unexpected I/O operation.</div></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/text/Format.html?is-external=true#format(java.lang.Object,java.lang.StringBuffer,java.text.FieldPosition)" title="class or interface in java.text" class="externalLink">format</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/text/Format.html?is-external=true" title="class or interface in java.text" class="externalLink">Format</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>object</code> - the object to format.</dd>
<dd><code>to­Append­To</code> - where to format the object.</dd>
<dd><code>pos</code> - ignored in current implementation.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the given buffer, returned for convenience.</dd>
</dl>
</li>
</ul>
<a id="getFormat(java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFormat</h4>
<pre class="methodSignature">protected&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/text/Format.html?is-external=true" title="class or interface in java.text" class="externalLink">Format</a>&nbsp;getFormat&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a>&lt;?&gt;&nbsp;valueType)</pre>
<div class="block">Returns the format to use for parsing and formatting values of the given type.
This method applies the following algorithm:
<ol>
<li>If a format is cached for the given type, return that format.</li>
<li>Otherwise if a format can be <a href="#createFormat(java.lang.Class)">created</a>
for the given type, cache the newly created format and return it.</li>
<li>Otherwise do again the same checks for the <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true#getSuperclass()" title="class or interface in java.lang" class="externalLink">super class</a>.</li>
<li>If no format is found for a concrete class, search again for
<a href="../util/Classes.html#getAllInterfaces(java.lang.Class)">all implemented interfaces</a>.</li>
<li>If no format can be created, return <code>null</code>.</li>
</ol>
See <a href="#createFormat(java.lang.Class)"><code>create­Format(Class)</code></a> for the list of value types recognized by the default
<code>Compound­Format</code> implementation.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value­Type</code> - the base type of values to parse or format, or <code>null</code> if unknown.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the format to use for parsing and formatting values of the given type or any parent type,
or <code>null</code> if none.</dd>
</dl>
</li>
</ul>
<a id="createFormat(java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createFormat</h4>
<pre class="methodSignature">protected&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/text/Format.html?is-external=true" title="class or interface in java.text" class="externalLink">Format</a>&nbsp;createFormat&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a>&lt;?&gt;&nbsp;valueType)</pre>
<div class="block">Creates a new format to use for parsing and formatting values of the given type.
This method is invoked by <a href="#getFormat(java.lang.Class)"><code>get­Format(Class)</code></a> the first time that a format
is needed for the given type.
The class given in argument can be any of the classes listed in the "Value type" column below:
<table class="sis">
<caption>Supported value types</caption>
<tr><th>Value type</th> <th>Format type</th></tr>
<tr><td><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/DirectPosition.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink"><code>DirectPosition</code></a></td> <td><a href="../geometry/CoordinateFormat.html" title="class in org.apache.sis.geometry"><code>CoordinateFormat</code></a></td></tr>
<tr><td><a href="../measure/Angle.html" title="class in org.apache.sis.measure"><code>Angle</code></a></td> <td><a href="../measure/AngleFormat.html" title="class in org.apache.sis.measure"><code>AngleFormat</code></a></td></tr>
<tr><td><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util" class="externalLink"><code>Date</code></a></td> <td><a href="https://docs.oracle.com/javase/8/docs/api/java/text/DateFormat.html?is-external=true" title="class or interface in java.text" class="externalLink"><code>DateFormat</code></a></td></tr>
<tr><td><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></td> <td><a href="https://docs.oracle.com/javase/8/docs/api/java/text/NumberFormat.html?is-external=true" title="class or interface in java.text" class="externalLink"><code>NumberFormat</code></a></td></tr>
<tr><td><a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/Unit.html?is-external=true" title="class or interface in javax.measure" class="externalLink"><code>Unit</code></a></td> <td><a href="../measure/UnitFormat.html" title="class in org.apache.sis.measure"><code>UnitFormat</code></a></td></tr>
<tr><td><a href="../measure/Range.html" title="class in org.apache.sis.measure"><code>Range</code></a></td> <td><a href="../measure/RangeFormat.html" title="class in org.apache.sis.measure"><code>RangeFormat</code></a></td></tr>
<tr><td><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Class</code></a></td> <td>(internal)</td></tr>
</table>
Subclasses can override this method for adding more types, or for configuring the
newly created <a href="https://docs.oracle.com/javase/8/docs/api/java/text/Format.html?is-external=true" title="class or interface in java.text" class="externalLink"><code>Format</code></a> instances. Note that implementations shall check the
type using the <code>expected == type</code> comparator, not
<code>expected.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true#isAssignableFrom(java.lang.Class)" title="class or interface in java.lang" class="externalLink">is­Assignable­From</a>(type)</code>,
because the check for parent types is done by the <a href="#getFormat(java.lang.Class)"><code>get­Format(Class)</code></a> method.
This approach allows subclasses to create specialized formats for different value
sub-types. For example a subclass may choose to format <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Double</code></a> values differently
than other types of number.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value­Type</code> - the base type of values to parse or format.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the format to use for parsing of formatting values of the given type, or <code>null</code> if none.</dd>
</dl>
</li>
</ul>
<a id="clone()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>clone</h4>
<pre class="methodSignature">public&nbsp;<a href="CompoundFormat.html" title="class in org.apache.sis.io">CompoundFormat</a>&lt;<a href="CompoundFormat.html" title="type parameter in CompoundFormat">T</a>&gt;&nbsp;clone()</pre>
<div class="block">Returns a clone of this format.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/text/Format.html?is-external=true#clone()" title="class or interface in java.text" class="externalLink">clone</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/text/Format.html?is-external=true" title="class or interface in java.text" class="externalLink">Format</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a clone of this format.</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/CompoundFormat.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><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="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>