blob: 4f4b7ff64792a1e47a15a3178ac5819e312276d5 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>ProperFractionFormat (Apache Commons Math 3.3 API)</title>
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="ProperFractionFormat (Apache Commons Math 3.3 API)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/ProperFractionFormat.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 class="aboutLanguage"><em><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script></em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/commons/math3/fraction/ProperBigFractionFormat.html" title="class in org.apache.commons.math3.fraction"><span class="strong">Prev Class</span></a></li>
<li>Next Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/commons/math3/fraction/ProperFractionFormat.html" target="_top">Frames</a></li>
<li><a href="ProperFractionFormat.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></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>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested_classes_inherited_from_class_java.text.NumberFormat">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#fields_inherited_from_class_java.text.NumberFormat">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>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 name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.commons.math3.fraction</div>
<h2 title="Class ProperFractionFormat" class="title">Class ProperFractionFormat</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/6/docs/api/java/text/Format.html?is-external=true" title="class or interface in java.text">java.text.Format</a></li>
<li>
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true" title="class or interface in java.text">java.text.NumberFormat</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../../org/apache/commons/math3/fraction/AbstractFormat.html" title="class in org.apache.commons.math3.fraction">org.apache.commons.math3.fraction.AbstractFormat</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../../org/apache/commons/math3/fraction/FractionFormat.html" title="class in org.apache.commons.math3.fraction">org.apache.commons.math3.fraction.FractionFormat</a></li>
<li>
<ul class="inheritance">
<li>org.apache.commons.math3.fraction.ProperFractionFormat</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="http://docs.oracle.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Cloneable.html?is-external=true" title="class or interface in java.lang">Cloneable</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="strong">ProperFractionFormat</span>
extends <a href="../../../../../org/apache/commons/math3/fraction/FractionFormat.html" title="class in org.apache.commons.math3.fraction">FractionFormat</a></pre>
<div class="block">Formats a Fraction number in proper format. The number format for each of
the whole number, numerator and, denominator can be configured.
<p>
Minus signs are only allowed in the whole number part - i.e.,
"-3 1/2" is legitimate and denotes -7/2, but "-3 -1/2" is invalid and
will result in a <code>ParseException</code>.</p></div>
<dl><dt><span class="strong">Since:</span></dt>
<dd>1.1</dd>
<dt><span class="strong">Version:</span></dt>
<dd>$Id: ProperFractionFormat.java 1547633 2013-12-03 23:03:06Z tn $</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../serialized-form.html#org.apache.commons.math3.fraction.ProperFractionFormat">Serialized Form</a></dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested_class_summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<ul class="blockList">
<li class="blockList"><a name="nested_classes_inherited_from_class_java.text.NumberFormat">
<!-- -->
</a>
<h3>Nested classes/interfaces inherited from class&nbsp;java.text.<a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true" title="class or interface in java.text">NumberFormat</a></h3>
<code><a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.Field.html?is-external=true" title="class or interface in java.text">NumberFormat.Field</a></code></li>
</ul>
</li>
</ul>
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<ul class="blockList">
<li class="blockList"><a name="fields_inherited_from_class_java.text.NumberFormat">
<!-- -->
</a>
<h3>Fields inherited from class&nbsp;java.text.<a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true" title="class or interface in java.text">NumberFormat</a></h3>
<code><a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true#FRACTION_FIELD" title="class or interface in java.text">FRACTION_FIELD</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true#INTEGER_FIELD" title="class or interface in java.text">INTEGER_FIELD</a></code></li>
</ul>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/ProperFractionFormat.html#ProperFractionFormat()">ProperFractionFormat</a></strong>()</code>
<div class="block">Create a proper formatting instance with the default number format for
the whole, numerator, and denominator.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/ProperFractionFormat.html#ProperFractionFormat(java.text.NumberFormat)">ProperFractionFormat</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true" title="class or interface in java.text">NumberFormat</a>&nbsp;format)</code>
<div class="block">Create a proper formatting instance with a custom number format for the
whole, numerator, and denominator.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/ProperFractionFormat.html#ProperFractionFormat(java.text.NumberFormat, java.text.NumberFormat, java.text.NumberFormat)">ProperFractionFormat</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true" title="class or interface in java.text">NumberFormat</a>&nbsp;wholeFormat,
<a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true" title="class or interface in java.text">NumberFormat</a>&nbsp;numeratorFormat,
<a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true" title="class or interface in java.text">NumberFormat</a>&nbsp;denominatorFormat)</code>
<div class="block">Create a proper formatting instance with a custom number format for each
of the whole, numerator, and denominator.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/StringBuffer.html?is-external=true" title="class or interface in java.lang">StringBuffer</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/ProperFractionFormat.html#format(org.apache.commons.math3.fraction.Fraction, java.lang.StringBuffer, java.text.FieldPosition)">format</a></strong>(<a href="../../../../../org/apache/commons/math3/fraction/Fraction.html" title="class in org.apache.commons.math3.fraction">Fraction</a>&nbsp;fraction,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/StringBuffer.html?is-external=true" title="class or interface in java.lang">StringBuffer</a>&nbsp;toAppendTo,
<a href="http://docs.oracle.com/javase/6/docs/api/java/text/FieldPosition.html?is-external=true" title="class or interface in java.text">FieldPosition</a>&nbsp;pos)</code>
<div class="block">Formats a <a href="../../../../../org/apache/commons/math3/fraction/Fraction.html" title="class in org.apache.commons.math3.fraction"><code>Fraction</code></a> object to produce a string.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true" title="class or interface in java.text">NumberFormat</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/ProperFractionFormat.html#getWholeFormat()">getWholeFormat</a></strong>()</code>
<div class="block">Access the whole format.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/fraction/Fraction.html" title="class in org.apache.commons.math3.fraction">Fraction</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/ProperFractionFormat.html#parse(java.lang.String, java.text.ParsePosition)">parse</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;source,
<a href="http://docs.oracle.com/javase/6/docs/api/java/text/ParsePosition.html?is-external=true" title="class or interface in java.text">ParsePosition</a>&nbsp;pos)</code>
<div class="block">Parses a string to produce a <a href="../../../../../org/apache/commons/math3/fraction/Fraction.html" title="class in org.apache.commons.math3.fraction"><code>Fraction</code></a> object.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/ProperFractionFormat.html#setWholeFormat(java.text.NumberFormat)">setWholeFormat</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true" title="class or interface in java.text">NumberFormat</a>&nbsp;format)</code>
<div class="block">Modify the whole format.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_org.apache.commons.math3.fraction.FractionFormat">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.commons.math3.fraction.<a href="../../../../../org/apache/commons/math3/fraction/FractionFormat.html" title="class in org.apache.commons.math3.fraction">FractionFormat</a></h3>
<code><a href="../../../../../org/apache/commons/math3/fraction/FractionFormat.html#format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition)">format</a>, <a href="../../../../../org/apache/commons/math3/fraction/FractionFormat.html#formatFraction(org.apache.commons.math3.fraction.Fraction)">formatFraction</a>, <a href="../../../../../org/apache/commons/math3/fraction/FractionFormat.html#getAvailableLocales()">getAvailableLocales</a>, <a href="../../../../../org/apache/commons/math3/fraction/FractionFormat.html#getDefaultNumberFormat()">getDefaultNumberFormat</a>, <a href="../../../../../org/apache/commons/math3/fraction/FractionFormat.html#getImproperInstance()">getImproperInstance</a>, <a href="../../../../../org/apache/commons/math3/fraction/FractionFormat.html#getImproperInstance(java.util.Locale)">getImproperInstance</a>, <a href="../../../../../org/apache/commons/math3/fraction/FractionFormat.html#getProperInstance()">getProperInstance</a>, <a href="../../../../../org/apache/commons/math3/fraction/FractionFormat.html#getProperInstance(java.util.Locale)">getProperInstance</a>, <a href="../../../../../org/apache/commons/math3/fraction/FractionFormat.html#parse(java.lang.String)">parse</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_org.apache.commons.math3.fraction.AbstractFormat">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.commons.math3.fraction.<a href="../../../../../org/apache/commons/math3/fraction/AbstractFormat.html" title="class in org.apache.commons.math3.fraction">AbstractFormat</a></h3>
<code><a href="../../../../../org/apache/commons/math3/fraction/AbstractFormat.html#format(double, java.lang.StringBuffer, java.text.FieldPosition)">format</a>, <a href="../../../../../org/apache/commons/math3/fraction/AbstractFormat.html#format(long, java.lang.StringBuffer, java.text.FieldPosition)">format</a>, <a href="../../../../../org/apache/commons/math3/fraction/AbstractFormat.html#getDefaultNumberFormat(java.util.Locale)">getDefaultNumberFormat</a>, <a href="../../../../../org/apache/commons/math3/fraction/AbstractFormat.html#getDenominatorFormat()">getDenominatorFormat</a>, <a href="../../../../../org/apache/commons/math3/fraction/AbstractFormat.html#getNumeratorFormat()">getNumeratorFormat</a>, <a href="../../../../../org/apache/commons/math3/fraction/AbstractFormat.html#parseAndIgnoreWhitespace(java.lang.String, java.text.ParsePosition)">parseAndIgnoreWhitespace</a>, <a href="../../../../../org/apache/commons/math3/fraction/AbstractFormat.html#parseNextCharacter(java.lang.String, java.text.ParsePosition)">parseNextCharacter</a>, <a href="../../../../../org/apache/commons/math3/fraction/AbstractFormat.html#setDenominatorFormat(java.text.NumberFormat)">setDenominatorFormat</a>, <a href="../../../../../org/apache/commons/math3/fraction/AbstractFormat.html#setNumeratorFormat(java.text.NumberFormat)">setNumeratorFormat</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.text.NumberFormat">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.text.<a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true" title="class or interface in java.text">NumberFormat</a></h3>
<code><a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true#clone()" title="class or interface in java.text">clone</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.text">equals</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true#format(double)" title="class or interface in java.text">format</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true#format(long)" title="class or interface in java.text">format</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true#getCurrency()" title="class or interface in java.text">getCurrency</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true#getCurrencyInstance()" title="class or interface in java.text">getCurrencyInstance</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true#getCurrencyInstance(java.util.Locale)" title="class or interface in java.text">getCurrencyInstance</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true#getInstance()" title="class or interface in java.text">getInstance</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true#getInstance(java.util.Locale)" title="class or interface in java.text">getInstance</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true#getIntegerInstance()" title="class or interface in java.text">getIntegerInstance</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true#getIntegerInstance(java.util.Locale)" title="class or interface in java.text">getIntegerInstance</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true#getMaximumFractionDigits()" title="class or interface in java.text">getMaximumFractionDigits</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true#getMaximumIntegerDigits()" title="class or interface in java.text">getMaximumIntegerDigits</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true#getMinimumFractionDigits()" title="class or interface in java.text">getMinimumFractionDigits</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true#getMinimumIntegerDigits()" title="class or interface in java.text">getMinimumIntegerDigits</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true#getNumberInstance()" title="class or interface in java.text">getNumberInstance</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true#getNumberInstance(java.util.Locale)" title="class or interface in java.text">getNumberInstance</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true#getPercentInstance()" title="class or interface in java.text">getPercentInstance</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true#getPercentInstance(java.util.Locale)" title="class or interface in java.text">getPercentInstance</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true#getRoundingMode()" title="class or interface in java.text">getRoundingMode</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true#hashCode()" title="class or interface in java.text">hashCode</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true#isGroupingUsed()" title="class or interface in java.text">isGroupingUsed</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true#isParseIntegerOnly()" title="class or interface in java.text">isParseIntegerOnly</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true#parseObject(java.lang.String, java.text.ParsePosition)" title="class or interface in java.text">parseObject</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true#setCurrency(java.util.Currency)" title="class or interface in java.text">setCurrency</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true#setGroupingUsed(boolean)" title="class or interface in java.text">setGroupingUsed</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true#setMaximumFractionDigits(int)" title="class or interface in java.text">setMaximumFractionDigits</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true#setMaximumIntegerDigits(int)" title="class or interface in java.text">setMaximumIntegerDigits</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true#setMinimumFractionDigits(int)" title="class or interface in java.text">setMinimumFractionDigits</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true#setMinimumIntegerDigits(int)" title="class or interface in java.text">setMinimumIntegerDigits</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true#setParseIntegerOnly(boolean)" title="class or interface in java.text">setParseIntegerOnly</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true#setRoundingMode(java.math.RoundingMode)" title="class or interface in java.text">setRoundingMode</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.text.Format">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.text.<a href="http://docs.oracle.com/javase/6/docs/api/java/text/Format.html?is-external=true" title="class or interface in java.text">Format</a></h3>
<code><a href="http://docs.oracle.com/javase/6/docs/api/java/text/Format.html?is-external=true#format(java.lang.Object)" title="class or interface in java.text">format</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/text/Format.html?is-external=true#formatToCharacterIterator(java.lang.Object)" title="class or interface in java.text">formatToCharacterIterator</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/text/Format.html?is-external=true#parseObject(java.lang.String)" title="class or interface in java.text">parseObject</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="ProperFractionFormat()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ProperFractionFormat</h4>
<pre>public&nbsp;ProperFractionFormat()</pre>
<div class="block">Create a proper formatting instance with the default number format for
the whole, numerator, and denominator.</div>
</li>
</ul>
<a name="ProperFractionFormat(java.text.NumberFormat)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ProperFractionFormat</h4>
<pre>public&nbsp;ProperFractionFormat(<a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true" title="class or interface in java.text">NumberFormat</a>&nbsp;format)</pre>
<div class="block">Create a proper formatting instance with a custom number format for the
whole, numerator, and denominator.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>format</code> - the custom format for the whole, numerator, and
denominator.</dd></dl>
</li>
</ul>
<a name="ProperFractionFormat(java.text.NumberFormat, java.text.NumberFormat, java.text.NumberFormat)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>ProperFractionFormat</h4>
<pre>public&nbsp;ProperFractionFormat(<a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true" title="class or interface in java.text">NumberFormat</a>&nbsp;wholeFormat,
<a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true" title="class or interface in java.text">NumberFormat</a>&nbsp;numeratorFormat,
<a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true" title="class or interface in java.text">NumberFormat</a>&nbsp;denominatorFormat)</pre>
<div class="block">Create a proper formatting instance with a custom number format for each
of the whole, numerator, and denominator.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>wholeFormat</code> - the custom format for the whole.</dd><dd><code>numeratorFormat</code> - the custom format for the numerator.</dd><dd><code>denominatorFormat</code> - the custom format for the denominator.</dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="format(org.apache.commons.math3.fraction.Fraction, java.lang.StringBuffer, java.text.FieldPosition)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>format</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/StringBuffer.html?is-external=true" title="class or interface in java.lang">StringBuffer</a>&nbsp;format(<a href="../../../../../org/apache/commons/math3/fraction/Fraction.html" title="class in org.apache.commons.math3.fraction">Fraction</a>&nbsp;fraction,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/StringBuffer.html?is-external=true" title="class or interface in java.lang">StringBuffer</a>&nbsp;toAppendTo,
<a href="http://docs.oracle.com/javase/6/docs/api/java/text/FieldPosition.html?is-external=true" title="class or interface in java.text">FieldPosition</a>&nbsp;pos)</pre>
<div class="block">Formats a <a href="../../../../../org/apache/commons/math3/fraction/Fraction.html" title="class in org.apache.commons.math3.fraction"><code>Fraction</code></a> object to produce a string. The fraction
is output in proper format.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/fraction/FractionFormat.html#format(org.apache.commons.math3.fraction.Fraction, java.lang.StringBuffer, java.text.FieldPosition)">format</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/commons/math3/fraction/FractionFormat.html" title="class in org.apache.commons.math3.fraction">FractionFormat</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>fraction</code> - the object to format.</dd><dd><code>toAppendTo</code> - where the text is to be appended</dd><dd><code>pos</code> - On input: an alignment field, if desired. On output: the
offsets of the alignment field</dd>
<dt><span class="strong">Returns:</span></dt><dd>the value passed in as toAppendTo.</dd></dl>
</li>
</ul>
<a name="getWholeFormat()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getWholeFormat</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true" title="class or interface in java.text">NumberFormat</a>&nbsp;getWholeFormat()</pre>
<div class="block">Access the whole format.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the whole format.</dd></dl>
</li>
</ul>
<a name="parse(java.lang.String, java.text.ParsePosition)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>parse</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/commons/math3/fraction/Fraction.html" title="class in org.apache.commons.math3.fraction">Fraction</a>&nbsp;parse(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;source,
<a href="http://docs.oracle.com/javase/6/docs/api/java/text/ParsePosition.html?is-external=true" title="class or interface in java.text">ParsePosition</a>&nbsp;pos)</pre>
<div class="block">Parses a string to produce a <a href="../../../../../org/apache/commons/math3/fraction/Fraction.html" title="class in org.apache.commons.math3.fraction"><code>Fraction</code></a> object. This method
expects the string to be formatted as a proper fraction.
<p>
Minus signs are only allowed in the whole number part - i.e.,
"-3 1/2" is legitimate and denotes -7/2, but "-3 -1/2" is invalid and
will result in a <code>ParseException</code>.</p></div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/fraction/FractionFormat.html#parse(java.lang.String, java.text.ParsePosition)">parse</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/commons/math3/fraction/FractionFormat.html" title="class in org.apache.commons.math3.fraction">FractionFormat</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>source</code> - the string to parse</dd><dd><code>pos</code> - input/ouput parsing parameter.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the parsed <a href="../../../../../org/apache/commons/math3/fraction/Fraction.html" title="class in org.apache.commons.math3.fraction"><code>Fraction</code></a> object.</dd></dl>
</li>
</ul>
<a name="setWholeFormat(java.text.NumberFormat)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>setWholeFormat</h4>
<pre>public&nbsp;void&nbsp;setWholeFormat(<a href="http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html?is-external=true" title="class or interface in java.text">NumberFormat</a>&nbsp;format)</pre>
<div class="block">Modify the whole format.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>format</code> - The new whole format value.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</a></code> - if <code>format</code> is <code>null</code>.</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/ProperFractionFormat.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 class="aboutLanguage"><em><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script></em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/commons/math3/fraction/ProperBigFractionFormat.html" title="class in org.apache.commons.math3.fraction"><span class="strong">Prev Class</span></a></li>
<li>Next Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/commons/math3/fraction/ProperFractionFormat.html" target="_top">Frames</a></li>
<li><a href="ProperFractionFormat.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested_classes_inherited_from_class_java.text.NumberFormat">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#fields_inherited_from_class_java.text.NumberFormat">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>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 name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2003&#x2013;2014 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>