git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1043066 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gilles Sadowski 2010-12-07 14:40:16 +00:00
parent d54330b9bc
commit 34c5d96df7
1 changed files with 5 additions and 5 deletions

View File

@ -26,6 +26,7 @@ import java.util.List;
import java.util.Locale;
import org.apache.commons.math.MathRuntimeException;
import org.apache.commons.math.exception.MathIllegalArgumentException;
import org.apache.commons.math.exception.util.LocalizedFormats;
import org.apache.commons.math.util.CompositeFormat;
@ -236,19 +237,18 @@ public class RealVectorFormat extends CompositeFormat {
* offsets of the alignment field
* @return the value passed in as toAppendTo.
* @see java.text.Format#format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition)
* @throws IllegalArgumentException is <code>obj</code> is not a valid type.
* @throws MathIllegalArgumentException is {@code obj} is not a valid type.
*/
@Override
public StringBuffer format(Object obj, StringBuffer toAppendTo,
FieldPosition pos) {
if (obj instanceof RealVector) {
return format( (RealVector)obj, toAppendTo, pos);
return format((RealVector) obj, toAppendTo, pos);
}
throw MathRuntimeException.createIllegalArgumentException(
LocalizedFormats.CANNOT_FORMAT_INSTANCE_AS_REAL_VECTOR,
obj.getClass().getName());
throw new MathIllegalArgumentException(LocalizedFormats.CANNOT_FORMAT_INSTANCE_AS_REAL_VECTOR,
obj.getClass().getName());
}