blob: 685568f5eeaab580c63414257218f7f71f9dfa9d [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>ResourceInternationalString (Apache SIS 1.0 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2019-09-20">
<meta name="keywords" content="org.apache.sis.util.iso.ResourceInternationalString class">
<meta name="keywords" content="resources">
<meta name="keywords" content="key">
<meta name="keywords" content="getBundle()">
<meta name="keywords" content="toString()">
<meta name="keywords" content="equals()">
<meta name="keywords" content="hashCode()">
<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="ResourceInternationalString (Apache SIS 1.0 API)";
}
}
catch(err) {
}
//-->
var data = {"i0":10,"i1":10,"i2":10,"i3":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../../";
var useModuleDirectories = false;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/ResourceInternationalString.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&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><a href="#field.detail">Field</a>&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.util.iso</a></div>
<h2 title="Class ResourceInternationalString" class="title">Class ResourceInternationalString</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="AbstractInternationalString.html" title="class in org.apache.sis.util.iso">AbstractInternationalString</a></li>
<li>
<ul class="inheritance">
<li>ResourceInternationalString</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">Serializable</a></code>, <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang" class="externalLink">Char­Sequence</a></code>, <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Comparable</a>&lt;<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">International­String</a>&gt;</code>, <code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Formattable.html?is-external=true" title="class or interface in java.util" class="externalLink">Formattable</a></code>, <code><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">International­String</a></code></dd>
</dl>
<hr>
<pre>public class <span class="typeNameLabel">ResourceInternationalString</span>
extends <a href="AbstractInternationalString.html" title="class in org.apache.sis.util.iso">AbstractInternationalString</a>
implements <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></pre>
<div class="block">An international string backed by a <a href="https://docs.oracle.com/javase/8/docs/api/java/util/ResourceBundle.html?is-external=true" title="class or interface in java.util" class="externalLink"><code>Resource­Bundle</code></a>.
Resource bundles can be Java classes or <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util" class="externalLink">properties</a> files, one for each
language. The fully qualified class name of the base resource bundle (without locale suffix)
is specified at <a href="#%3Cinit%3E(java.lang.String,java.lang.String)">construction time</a>.
The appropriate resource bundle is loaded at runtime for the client's language by looking for
a class or a properties file with the right suffix, for example <code>"_en"</code> for English or
<code>"_fr"</code> for French.
See the <a href="https://docs.oracle.com/javase/8/docs/api/java/util/ResourceBundle.html?is-external=true#getBundle(java.lang.String,java.util.Locale,java.lang.ClassLoader)" title="class or interface in java.util" class="externalLink"><code>Resource­Bundle​.get­Bundle(…)</code></a>
Javadoc for more information.
<div class="note"><b>Example:</b>
if a file named "<code>My­Resources​.properties</code>" exists in <code>org​.mypackage</code>
and contains the following line:
<blockquote><pre>MyKey = some value</pre></blockquote>
Then an international string for <code>"some value"</code> can be created using the following code:
<blockquote><pre>InternationalString value = <font color="green">new</font> <b>ResourceInternationalString</b>(<font color="orangered">"org.mypackage.MyResources"</font>, <font color="orangered">"MyKey"</font>);</pre></blockquote>
The <code>"some value"</code> string will be localized if the required properties files exist, for
example "<code>My­Resources_fr​.properties</code>" for French or "<code>My­Resources_it​.properties</code>"
for Italian, <i>etc</i>.
If needed, users can gain more control by overriding the <a href="#getBundle(java.util.Locale)"><code>get­Bundle(Locale)</code></a> method.
</div>
<div class="section">Class loaders</div>
Developers can specify explicitly the <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ClassLoader.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Class­Loader</code></a> to use be overriding the
<a href="#getBundle(java.util.Locale)"><code>get­Bundle(Locale)</code></a> method. This is recommended if the running environment
loads modules in isolated class loaders, as OSGi does for instance.
<div class="note"><b>API note:</b>
We do not provide <code>Class­Loader</code> argument in the constructor of this class because class loaders
can often be hard-coded (thus avoiding the cost of an extra field) and are usually not serializable.</div>
<div class="section">Apache SIS resources</div>
Apache SIS has its own resources mechanism, built on top of the standard <code>Resource­Bundle</code>
with the addition of type safety and optional arguments to be formatted in the localized string.
Those resource bundles provide <code>format­International(int, …)</code> static methods for creating
international strings with the same functionality than this <code>Resource­International­String</code>.
See <code>org​.apache​.sis​.util​.resources</code> for more information.
<div class="section">Immutability and thread safety</div>
This class is immutable and thus inherently thread-safe if the bundles created by <a href="#getBundle(java.util.Locale)"><code>get­Bundle(Locale)</code></a>
is also immutable. Subclasses may or may not be immutable, at implementation choice. But implementers are
encouraged to make sure that subclasses remain immutable for more predictable behavior.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>0.3</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="https://docs.oracle.com/javase/8/docs/api/java/util/ResourceBundle.html?is-external=true#getBundle(java.lang.String,java.util.Locale)" title="class or interface in java.util" class="externalLink"><code>Resource­Bundle​.get­Bundle(String, Locale)</code></a>,
<a href="../../../../../serialized-form.html#org.apache.sis.util.iso.ResourceInternationalString">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">
<!-- =========== FIELD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Field</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#key">key</a></span></code></th>
<td class="colLast">
<div class="block">The key for the resource to fetch.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#resources">resources</a></span></code></th>
<td class="colLast">
<div class="block">The name of the resource bundle, as a fully qualified class name.</div>
</td>
</tr>
</table>
</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">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(java.lang.String,java.lang.String)">ResourceInternationalString</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;resources,
<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;key)</code></th>
<td class="colLast">
<div class="block">Creates a new international string from the specified resource bundle and key.</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="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>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#equals(java.lang.Object)">equals</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&nbsp;object)</code></th>
<td class="colLast">
<div class="block">Compares this international string with the specified object for equality.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/util/ResourceBundle.html?is-external=true" title="class or interface in java.util" class="externalLink">ResourceBundle</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getBundle(java.util.Locale)">getBundle</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)</code></th>
<td class="colLast">
<div class="block">Returns the resource bundle for the given locale.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hashCode()">hashCode</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns a hash code value for this international text.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toString(java.util.Locale)">toString</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)</code></th>
<td class="colLast">
<div class="block">Returns a string in the specified locale.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.AbstractInternationalString">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;<a href="AbstractInternationalString.html" title="class in org.apache.sis.util.iso">AbstractInternationalString</a></h3>
<code><a href="AbstractInternationalString.html#charAt(int)">char­At</a>, <a href="AbstractInternationalString.html#compareTo(org.opengis.util.InternationalString)">compare­To</a>, <a href="AbstractInternationalString.html#formatTo(java.util.Formatter,int,int,int)">format­To</a>, <a href="AbstractInternationalString.html#length()">length</a>, <a href="AbstractInternationalString.html#subSequence(int,int)">sub­Sequence</a>, <a href="AbstractInternationalString.html#toString()">to­String</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#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">get­Class</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notify­All</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink">wait</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.CharSequence">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;<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></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true#chars()" title="class or interface in java.lang" class="externalLink">chars</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true#codePoints()" title="class or interface in java.lang" class="externalLink">code­Points</a></code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a id="resources">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>resources</h4>
<pre>protected final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> resources</pre>
<div class="block">The name of the resource bundle, as a fully qualified class name.
This value is given at construction time and can not be <code>null</code>.</div>
</li>
</ul>
<a id="key">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>key</h4>
<pre>protected final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> key</pre>
<div class="block">The key for the resource to fetch.
This value is given at construction time and can not be <code>null</code>.</div>
</li>
</ul>
</li>
</ul>
</section>
<!-- ========= 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.lang.String,java.lang.String)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>ResourceInternationalString</h4>
<pre>public&nbsp;ResourceInternationalString&#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;resources,
<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;key)</pre>
<div class="block">Creates a new international string from the specified resource bundle and key.
The class loader will be the one of the <a href="#toString(java.util.Locale)"><code>to­String(Locale)</code></a> caller,
unless the <a href="#getBundle(java.util.Locale)"><code>get­Bundle(Locale)</code></a> method is overridden.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>resources</code> - the name of the resource bundle, as a fully qualified class name.</dd>
<dd><code>key</code> - the key for the resource to fetch.</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="getBundle(java.util.Locale)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBundle</h4>
<pre class="methodSignature">protected&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/ResourceBundle.html?is-external=true" title="class or interface in java.util" class="externalLink">ResourceBundle</a>&nbsp;getBundle&#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)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/util/MissingResourceException.html?is-external=true" title="class or interface in java.util" class="externalLink">MissingResourceException</a></pre>
<div class="block">Returns the resource bundle for the given locale. The default implementation fetches the
bundle from the name given at <a href="#%3Cinit%3E(java.lang.String,java.lang.String)">construction time</a>.
Subclasses can override this method if they need to fetch the bundle in an other way.
<div class="section">Class loaders</div>
By default, this method loads the resources using the caller's class loader.
Subclasses can override this method in order to specify a different class loader.
For example, the code below works well if <code>My­Resource</code> is a class defined
in the same module than the one that contain the resources to load:
<blockquote><pre>@Override
<font color="green">protected</font> ResourceBundle <b>getBundle</b>(<font color="green">final</font> Locale locale) {
<font color="green">return</font> ResourceBundle.<b>getBundle</b>(resources, locale, MyResource.<font color="green">class</font>.<b>getClassLoader</b>());
}</pre></blockquote></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>locale</code> - the locale for which to get the resource bundle.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the resource bundle for the given locale.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/MissingResourceException.html?is-external=true" title="class or interface in java.util" class="externalLink">Missing­Resource­Exception</a></code> - if no resource bundle can be found for the base name specified
at <a href="#%3Cinit%3E(java.lang.String,java.lang.String)">construction time</a>.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="https://docs.oracle.com/javase/8/docs/api/java/util/ResourceBundle.html?is-external=true#getBundle(java.lang.String,java.util.Locale,java.lang.ClassLoader)" title="class or interface in java.util" class="externalLink"><code>Resource­Bundle​.get­Bundle(String, Locale, Class­Loader)</code></a></dd>
</dl>
</li>
</ul>
<a id="toString(java.util.Locale)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre class="methodSignature">public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;toString&#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)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/util/MissingResourceException.html?is-external=true" title="class or interface in java.util" class="externalLink">MissingResourceException</a></pre>
<div class="block">Returns a string in the specified locale. If there is no string for the specified
<code>locale</code>, then this method searches for a string in an other locale as
specified in the <a href="https://docs.oracle.com/javase/8/docs/api/java/util/ResourceBundle.html?is-external=true" title="class or interface in java.util" class="externalLink"><code>Resource­Bundle</code></a> class description.
<div class="section">Handling of <code>null</code> argument value</div>
In the default implementation, the <code>null</code> locale is handled as a synonymous of
<code>Locale​.ROOT</code>. However subclasses are free to use a different fallback. Client
code are encouraged to specify only non-null values for more determinist behavior.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/util/InternationalString.html?is-external=true#toString(java.util.Locale)" title="class or interface in org.opengis.util" class="externalLink">to­String</a></code>&nbsp;in interface&nbsp;<code><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">International­String</a></code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="AbstractInternationalString.html#toString(java.util.Locale)">to­String</a></code>&nbsp;in class&nbsp;<code><a href="AbstractInternationalString.html" title="class in org.apache.sis.util.iso">Abstract­International­String</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>locale</code> - the desired locale for the string to be returned.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the string in the specified locale, or in a fallback locale.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/MissingResourceException.html?is-external=true" title="class or interface in java.util" class="externalLink">Missing­Resource­Exception</a></code> - if no resource can be found for the base name or for the key
specified at <a href="#%3Cinit%3E(java.lang.String,java.lang.String)">construction time</a>.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html?is-external=true#getDefault()" title="class or interface in java.util" class="externalLink"><code>Locale​.get­Default()</code></a>,
<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></dd>
</dl>
</li>
</ul>
<a id="equals(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>equals</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;equals&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&nbsp;object)</pre>
<div class="block">Compares this international string with the specified object for equality.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>object</code> - the object to compare with this international string.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if the given object is equal to this string.</dd>
</dl>
</li>
</ul>
<a id="hashCode()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>hashCode</h4>
<pre class="methodSignature">public&nbsp;int&nbsp;hashCode()</pre>
<div class="block">Returns a hash code value for this international text.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hash­Code</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a hash code value for this international text.</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/ResourceInternationalString.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&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><a href="#field.detail">Field</a>&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>