public class org.apache.commons.math.complex.ComplexFormat extends java.lang.Object
{
private static final java.lang.String DEFAULT_IMAGINARY_CHARACTER;
private final java.lang.String imaginaryCharacter;
private final java.text.NumberFormat imaginaryFormat;
private final java.text.NumberFormat realFormat;
public void <init>()
{
java.text.NumberFormat v, v;
org.apache.commons.math.complex.ComplexFormat v;
v := @this: org.apache.commons.math.complex.ComplexFormat;
specialinvoke v.<java.lang.Object: void <init>()>();
v.<org.apache.commons.math.complex.ComplexFormat: java.lang.String imaginaryCharacter> = "i";
v = staticinvoke <org.apache.commons.math.util.CompositeFormat: java.text.NumberFormat getDefaultNumberFormat()>();
v.<org.apache.commons.math.complex.ComplexFormat: java.text.NumberFormat imaginaryFormat> = v;
v = v.<org.apache.commons.math.complex.ComplexFormat: java.text.NumberFormat imaginaryFormat>;
v.<org.apache.commons.math.complex.ComplexFormat: java.text.NumberFormat realFormat> = v;
return;
}
public void <init>(java.text.NumberFormat) throws org.apache.commons.math.exception.NullArgumentException
{
java.lang.Object[] v;
org.apache.commons.math.exception.util.LocalizedFormats v;
org.apache.commons.math.exception.NullArgumentException v;
java.text.NumberFormat v;
org.apache.commons.math.complex.ComplexFormat v;
v := @this: org.apache.commons.math.complex.ComplexFormat;
v := @parameter: java.text.NumberFormat;
specialinvoke v.<java.lang.Object: void <init>()>();
if v != null goto label;
v = new org.apache.commons.math.exception.NullArgumentException;
v = <org.apache.commons.math.exception.util.LocalizedFormats: org.apache.commons.math.exception.util.LocalizedFormats IMAGINARY_FORMAT>;
v = newarray (java.lang.Object)[0];
specialinvoke v.<org.apache.commons.math.exception.NullArgumentException: void <init>(org.apache.commons.math.exception.util.Localizable,java.lang.Object[])>(v, v);
throw v;
label:
v.<org.apache.commons.math.complex.ComplexFormat: java.lang.String imaginaryCharacter> = "i";
v.<org.apache.commons.math.complex.ComplexFormat: java.text.NumberFormat imaginaryFormat> = v;
v.<org.apache.commons.math.complex.ComplexFormat: java.text.NumberFormat realFormat> = v;
return;
}
public void <init>(java.text.NumberFormat, java.text.NumberFormat) throws org.apache.commons.math.exception.NullArgumentException
{
java.lang.Object[] v, v;
org.apache.commons.math.exception.util.LocalizedFormats v, v;
java.text.NumberFormat v, v;
org.apache.commons.math.complex.ComplexFormat v;
org.apache.commons.math.exception.NullArgumentException v, v;
v := @this: org.apache.commons.math.complex.ComplexFormat;
v := @parameter: java.text.NumberFormat;
v := @parameter: java.text.NumberFormat;
specialinvoke v.<java.lang.Object: void <init>()>();
if v != null goto label;
v = new org.apache.commons.math.exception.NullArgumentException;
v = <org.apache.commons.math.exception.util.LocalizedFormats: org.apache.commons.math.exception.util.LocalizedFormats IMAGINARY_FORMAT>;
v = newarray (java.lang.Object)[0];
specialinvoke v.<org.apache.commons.math.exception.NullArgumentException: void <init>(org.apache.commons.math.exception.util.Localizable,java.lang.Object[])>(v, v);
throw v;
label:
if v != null goto label;
v = new org.apache.commons.math.exception.NullArgumentException;
v = <org.apache.commons.math.exception.util.LocalizedFormats: org.apache.commons.math.exception.util.LocalizedFormats REAL_FORMAT>;
v = newarray (java.lang.Object)[0];
specialinvoke v.<org.apache.commons.math.exception.NullArgumentException: void <init>(org.apache.commons.math.exception.util.Localizable,java.lang.Object[])>(v, v);
throw v;
label:
v.<org.apache.commons.math.complex.ComplexFormat: java.lang.String imaginaryCharacter> = "i";
v.<org.apache.commons.math.complex.ComplexFormat: java.text.NumberFormat imaginaryFormat> = v;
v.<org.apache.commons.math.complex.ComplexFormat: java.text.NumberFormat realFormat> = v;
return;
}
public void <init>(java.lang.String) throws org.apache.commons.math.exception.NullArgumentException, org.apache.commons.math.exception.NoDataException
{
java.lang.String v;
java.text.NumberFormat v;
org.apache.commons.math.complex.ComplexFormat v;
v := @this: org.apache.commons.math.complex.ComplexFormat;
v := @parameter: java.lang.String;
v = staticinvoke <org.apache.commons.math.util.CompositeFormat: java.text.NumberFormat getDefaultNumberFormat()>();
specialinvoke v.<org.apache.commons.math.complex.ComplexFormat: void <init>(java.lang.String,java.text.NumberFormat)>(v, v);
return;
}
public void <init>(java.lang.String, java.text.NumberFormat) throws org.apache.commons.math.exception.NullArgumentException, org.apache.commons.math.exception.NoDataException
{
java.lang.String v;
java.text.NumberFormat v;
org.apache.commons.math.complex.ComplexFormat v;
v := @this: org.apache.commons.math.complex.ComplexFormat;
v := @parameter: java.lang.String;
v := @parameter: java.text.NumberFormat;
specialinvoke v.<org.apache.commons.math.complex.ComplexFormat: void <init>(java.lang.String,java.text.NumberFormat,java.text.NumberFormat)>(v, v, v);
return;
}
public void <init>(java.lang.String, java.text.NumberFormat, java.text.NumberFormat) throws org.apache.commons.math.exception.NullArgumentException, org.apache.commons.math.exception.NoDataException
{
java.lang.Object[] v, v;
org.apache.commons.math.exception.util.LocalizedFormats v, v;
java.text.NumberFormat v, v;
org.apache.commons.math.complex.ComplexFormat v;
org.apache.commons.math.exception.NullArgumentException v, v, v;
org.apache.commons.math.exception.NoDataException v;
int v;
java.lang.String v;
v := @this: org.apache.commons.math.complex.ComplexFormat;
v := @parameter: java.lang.String;
v := @parameter: java.text.NumberFormat;
v := @parameter: java.text.NumberFormat;
specialinvoke v.<java.lang.Object: void <init>()>();
if v != null goto label;
v = new org.apache.commons.math.exception.NullArgumentException;
specialinvoke v.<org.apache.commons.math.exception.NullArgumentException: void <init>()>();
throw v;
label:
v = virtualinvoke v.<java.lang.String: int length()>();
if v != 0 goto label;
v = new org.apache.commons.math.exception.NoDataException;
specialinvoke v.<org.apache.commons.math.exception.NoDataException: void <init>()>();
throw v;
label:
if v != null goto label;
v = new org.apache.commons.math.exception.NullArgumentException;
v = <org.apache.commons.math.exception.util.LocalizedFormats: org.apache.commons.math.exception.util.LocalizedFormats IMAGINARY_FORMAT>;
v = newarray (java.lang.Object)[0];
specialinvoke v.<org.apache.commons.math.exception.NullArgumentException: void <init>(org.apache.commons.math.exception.util.Localizable,java.lang.Object[])>(v, v);
throw v;
label:
if v != null goto label;
v = new org.apache.commons.math.exception.NullArgumentException;
v = <org.apache.commons.math.exception.util.LocalizedFormats: org.apache.commons.math.exception.util.LocalizedFormats REAL_FORMAT>;
v = newarray (java.lang.Object)[0];
specialinvoke v.<org.apache.commons.math.exception.NullArgumentException: void <init>(org.apache.commons.math.exception.util.Localizable,java.lang.Object[])>(v, v);
throw v;
label:
v.<org.apache.commons.math.complex.ComplexFormat: java.lang.String imaginaryCharacter> = v;
v.<org.apache.commons.math.complex.ComplexFormat: java.text.NumberFormat imaginaryFormat> = v;
v.<org.apache.commons.math.complex.ComplexFormat: java.text.NumberFormat realFormat> = v;
return;
}
public static java.util.Locale[] getAvailableLocales()
{
java.util.Locale[] v;
v = staticinvoke <java.text.NumberFormat: java.util.Locale[] getAvailableLocales()>();
return v;
}
public java.lang.String format(org.apache.commons.math.complex.Complex)
{
org.apache.commons.math.complex.Complex v;
java.text.FieldPosition v;
java.lang.StringBuffer v, v;
java.lang.String v;
org.apache.commons.math.complex.ComplexFormat v;
v := @this: org.apache.commons.math.complex.ComplexFormat;
v := @parameter: org.apache.commons.math.complex.Complex;
v = new java.lang.StringBuffer;
specialinvoke v.<java.lang.StringBuffer: void <init>()>();
v = new java.text.FieldPosition;
specialinvoke v.<java.text.FieldPosition: void <init>(int)>(0);
v = virtualinvoke v.<org.apache.commons.math.complex.ComplexFormat: java.lang.StringBuffer format(org.apache.commons.math.complex.Complex,java.lang.StringBuffer,java.text.FieldPosition)>(v, v, v);
v = virtualinvoke v.<java.lang.StringBuffer: java.lang.String toString()>();
return v;
}
public java.lang.String format(java.lang.Double)
{
java.lang.Double v;
org.apache.commons.math.complex.ComplexFormat v;
org.apache.commons.math.complex.Complex v;
java.text.FieldPosition v;
java.lang.StringBuffer v, v;
java.lang.String v;
double v;
v := @this: org.apache.commons.math.complex.ComplexFormat;
v := @parameter: java.lang.Double;
v = new org.apache.commons.math.complex.Complex;
v = virtualinvoke v.<java.lang.Double: double doubleValue()>();
specialinvoke v.<org.apache.commons.math.complex.Complex: void <init>(double,double)>(v, 0.0);
v = new java.lang.StringBuffer;
specialinvoke v.<java.lang.StringBuffer: void <init>()>();
v = new java.text.FieldPosition;
specialinvoke v.<java.text.FieldPosition: void <init>(int)>(0);
v = virtualinvoke v.<org.apache.commons.math.complex.ComplexFormat: java.lang.StringBuffer format(org.apache.commons.math.complex.Complex,java.lang.StringBuffer,java.text.FieldPosition)>(v, v, v);
v = virtualinvoke v.<java.lang.StringBuffer: java.lang.String toString()>();
return v;
}
public java.lang.StringBuffer format(org.apache.commons.math.complex.Complex, java.lang.StringBuffer, java.text.FieldPosition)
{
java.text.NumberFormat v;
org.apache.commons.math.complex.ComplexFormat v;
org.apache.commons.math.complex.Complex v;
byte v, v;
java.text.FieldPosition v;
java.lang.StringBuffer v, v, v, v, v;
java.lang.String v, v;
boolean v;
double v, v, v;
v := @this: org.apache.commons.math.complex.ComplexFormat;
v := @parameter: org.apache.commons.math.complex.Complex;
v := @parameter: java.lang.StringBuffer;
v := @parameter: java.text.FieldPosition;
virtualinvoke v.<java.text.FieldPosition: void setBeginIndex(int)>(0);
virtualinvoke v.<java.text.FieldPosition: void setEndIndex(int)>(0);
v = virtualinvoke v.<org.apache.commons.math.complex.Complex: double getReal()>();
v = virtualinvoke v.<org.apache.commons.math.complex.ComplexFormat: java.text.NumberFormat getRealFormat()>();
staticinvoke <org.apache.commons.math.util.CompositeFormat: java.lang.StringBuffer formatDouble(double,java.text.NumberFormat,java.lang.StringBuffer,java.text.FieldPosition)>(v, v, v, v);
v = virtualinvoke v.<org.apache.commons.math.complex.Complex: double getImaginary()>();
v = v cmpg 0.0;
if v >= 0 goto label;
virtualinvoke v.<java.lang.StringBuffer: java.lang.StringBuffer append(java.lang.String)>(" - ");
v = neg v;
v = new java.lang.StringBuffer;
specialinvoke v.<java.lang.StringBuffer: void <init>()>();
v = specialinvoke v.<org.apache.commons.math.complex.ComplexFormat: java.lang.StringBuffer formatImaginary(double,java.lang.StringBuffer,java.text.FieldPosition)>(v, v, v);
virtualinvoke v.<java.lang.StringBuffer: java.lang.StringBuffer append(java.lang.StringBuffer)>(v);
v = virtualinvoke v.<org.apache.commons.math.complex.ComplexFormat: java.lang.String getImaginaryCharacter()>();
virtualinvoke v.<java.lang.StringBuffer: java.lang.StringBuffer append(java.lang.String)>(v);
goto label;
label:
v = v cmpl 0.0;
if v > 0 goto label;
v = staticinvoke <java.lang.Double: boolean isNaN(double)>(v);
if v == 0 goto label;
label:
virtualinvoke v.<java.lang.StringBuffer: java.lang.StringBuffer append(java.lang.String)>(" + ");
v = new java.lang.StringBuffer;
specialinvoke v.<java.lang.StringBuffer: void <init>()>();
v = specialinvoke v.<org.apache.commons.math.complex.ComplexFormat: java.lang.StringBuffer formatImaginary(double,java.lang.StringBuffer,java.text.FieldPosition)>(v, v, v);
virtualinvoke v.<java.lang.StringBuffer: java.lang.StringBuffer append(java.lang.StringBuffer)>(v);
v = virtualinvoke v.<org.apache.commons.math.complex.ComplexFormat: java.lang.String getImaginaryCharacter()>();
virtualinvoke v.<java.lang.StringBuffer: java.lang.StringBuffer append(java.lang.String)>(v);
label:
return v;
}
private java.lang.StringBuffer formatImaginary(double, java.lang.StringBuffer, java.text.FieldPosition)
{
java.text.FieldPosition v;
java.lang.StringBuffer v;
java.lang.String v;
java.text.NumberFormat v;
org.apache.commons.math.complex.ComplexFormat v;
boolean v;
double v;
v := @this: org.apache.commons.math.complex.ComplexFormat;
v := @parameter: double;
v := @parameter: java.lang.StringBuffer;
v := @parameter: java.text.FieldPosition;
virtualinvoke v.<java.text.FieldPosition: void setBeginIndex(int)>(0);
virtualinvoke v.<java.text.FieldPosition: void setEndIndex(int)>(0);
v = virtualinvoke v.<org.apache.commons.math.complex.ComplexFormat: java.text.NumberFormat getImaginaryFormat()>();
staticinvoke <org.apache.commons.math.util.CompositeFormat: java.lang.StringBuffer formatDouble(double,java.text.NumberFormat,java.lang.StringBuffer,java.text.FieldPosition)>(v, v, v, v);
v = virtualinvoke v.<java.lang.StringBuffer: java.lang.String toString()>();
v = virtualinvoke v.<java.lang.String: boolean equals(java.lang.Object)>("1");
if v == 0 goto label;
virtualinvoke v.<java.lang.StringBuffer: void setLength(int)>(0);
label:
return v;
}
public java.lang.StringBuffer format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition) throws org.apache.commons.math.exception.MathIllegalArgumentException
{
java.lang.Object[] v;
org.apache.commons.math.exception.util.LocalizedFormats v;
org.apache.commons.math.complex.ComplexFormat v;
org.apache.commons.math.complex.Complex v;
java.text.FieldPosition v;
java.lang.StringBuffer v, v;
java.lang.Class v;
java.lang.Object v;
java.lang.String v;
boolean v, v;
double v;
org.apache.commons.math.exception.MathIllegalArgumentException v;
v := @this: org.apache.commons.math.complex.ComplexFormat;
v := @parameter: java.lang.Object;
v := @parameter: java.lang.StringBuffer;
v := @parameter: java.text.FieldPosition;
v = v instanceof org.apache.commons.math.complex.Complex;
if v == 0 goto label;
v = virtualinvoke v.<org.apache.commons.math.complex.ComplexFormat: java.lang.StringBuffer format(org.apache.commons.math.complex.Complex,java.lang.StringBuffer,java.text.FieldPosition)>(v, v, v);
goto label;
label:
v = v instanceof java.lang.Number;
if v == 0 goto label;
v = new org.apache.commons.math.complex.Complex;
v = virtualinvoke v.<java.lang.Number: double doubleValue()>();
specialinvoke v.<org.apache.commons.math.complex.Complex: void <init>(double,double)>(v, 0.0);
v = virtualinvoke v.<org.apache.commons.math.complex.ComplexFormat: java.lang.StringBuffer format(org.apache.commons.math.complex.Complex,java.lang.StringBuffer,java.text.FieldPosition)>(v, v, v);
goto label;
label:
v = new org.apache.commons.math.exception.MathIllegalArgumentException;
v = <org.apache.commons.math.exception.util.LocalizedFormats: org.apache.commons.math.exception.util.LocalizedFormats CANNOT_FORMAT_INSTANCE_AS_COMPLEX>;
v = newarray (java.lang.Object)[1];
v = virtualinvoke v.<java.lang.Object: java.lang.Class getClass()>();
v = virtualinvoke v.<java.lang.Class: java.lang.String getName()>();
v[0] = v;
specialinvoke v.<org.apache.commons.math.exception.MathIllegalArgumentException: void <init>(org.apache.commons.math.exception.util.Localizable,java.lang.Object[])>(v, v);
throw v;
label:
return v;
}
public java.lang.String getImaginaryCharacter()
{
java.lang.String v;
org.apache.commons.math.complex.ComplexFormat v;
v := @this: org.apache.commons.math.complex.ComplexFormat;
v = v.<org.apache.commons.math.complex.ComplexFormat: java.lang.String imaginaryCharacter>;
return v;
}
public java.text.NumberFormat getImaginaryFormat()
{
java.text.NumberFormat v;
org.apache.commons.math.complex.ComplexFormat v;
v := @this: org.apache.commons.math.complex.ComplexFormat;
v = v.<org.apache.commons.math.complex.ComplexFormat: java.text.NumberFormat imaginaryFormat>;
return v;
}
public static org.apache.commons.math.complex.ComplexFormat getInstance()
{
java.util.Locale v;
org.apache.commons.math.complex.ComplexFormat v;
v = staticinvoke <java.util.Locale: java.util.Locale getDefault()>();
v = staticinvoke <org.apache.commons.math.complex.ComplexFormat: org.apache.commons.math.complex.ComplexFormat getInstance(java.util.Locale)>(v);
return v;
}
public static org.apache.commons.math.complex.ComplexFormat getInstance(java.util.Locale)
{
java.text.NumberFormat v;
java.util.Locale v;
org.apache.commons.math.complex.ComplexFormat v;
v := @parameter: java.util.Locale;
v = staticinvoke <org.apache.commons.math.util.CompositeFormat: java.text.NumberFormat getDefaultNumberFormat(java.util.Locale)>(v);
v = new org.apache.commons.math.complex.ComplexFormat;
specialinvoke v.<org.apache.commons.math.complex.ComplexFormat: void <init>(java.text.NumberFormat)>(v);
return v;
}
public static org.apache.commons.math.complex.ComplexFormat getInstance(java.lang.String, java.util.Locale) throws org.apache.commons.math.exception.NullArgumentException, org.apache.commons.math.exception.NoDataException
{
java.util.Locale v;
java.lang.String v;
java.text.NumberFormat v;
org.apache.commons.math.complex.ComplexFormat v;
v := @parameter: java.lang.String;
v := @parameter: java.util.Locale;
v = staticinvoke <org.apache.commons.math.util.CompositeFormat: java.text.NumberFormat getDefaultNumberFormat(java.util.Locale)>(v);
v = new org.apache.commons.math.complex.ComplexFormat;
specialinvoke v.<org.apache.commons.math.complex.ComplexFormat: void <init>(java.lang.String,java.text.NumberFormat)>(v, v);
return v;
}
public java.text.NumberFormat getRealFormat()
{
java.text.NumberFormat v;
org.apache.commons.math.complex.ComplexFormat v;
v := @this: org.apache.commons.math.complex.ComplexFormat;
v = v.<org.apache.commons.math.complex.ComplexFormat: java.text.NumberFormat realFormat>;
return v;
}
public org.apache.commons.math.complex.Complex parse(java.lang.String) throws org.apache.commons.math.exception.MathParseException
{
org.apache.commons.math.complex.Complex v;
int v, v;
java.text.ParsePosition v;
org.apache.commons.math.exception.MathParseException v;
java.lang.String v;
org.apache.commons.math.complex.ComplexFormat v;
v := @this: org.apache.commons.math.complex.ComplexFormat;
v := @parameter: java.lang.String;
v = new java.text.ParsePosition;
specialinvoke v.<java.text.ParsePosition: void <init>(int)>(0);
v = virtualinvoke v.<org.apache.commons.math.complex.ComplexFormat: org.apache.commons.math.complex.Complex parse(java.lang.String,java.text.ParsePosition)>(v, v);
v = virtualinvoke v.<java.text.ParsePosition: int getIndex()>();
if v != 0 goto label;
v = new org.apache.commons.math.exception.MathParseException;
v = virtualinvoke v.<java.text.ParsePosition: int getErrorIndex()>();
specialinvoke v.<org.apache.commons.math.exception.MathParseException: void <init>(java.lang.String,int,java.lang.Class)>(v, v, class "Lorg/apache/commons/math3/complex/Complex;");
throw v;
label:
return v;
}
public org.apache.commons.math.complex.Complex parse(java.lang.String, java.text.ParsePosition)
{
java.text.ParsePosition v;
java.text.NumberFormat v, v;
org.apache.commons.math.complex.ComplexFormat v;
org.apache.commons.math.complex.Complex v, v;
byte v;
int v, v;
java.lang.String v, v;
java.lang.Number v, v;
boolean v;
double v, v, v, v;
char v;
v := @this: org.apache.commons.math.complex.ComplexFormat;
v := @parameter: java.lang.String;
v := @parameter: java.text.ParsePosition;
v = virtualinvoke v.<java.text.ParsePosition: int getIndex()>();
staticinvoke <org.apache.commons.math.util.CompositeFormat: void parseAndIgnoreWhitespace(java.lang.String,java.text.ParsePosition)>(v, v);
v = virtualinvoke v.<org.apache.commons.math.complex.ComplexFormat: java.text.NumberFormat getRealFormat()>();
v = staticinvoke <org.apache.commons.math.util.CompositeFormat: java.lang.Number parseNumber(java.lang.String,java.text.NumberFormat,java.text.ParsePosition)>(v, v, v);
if v != null goto label;
virtualinvoke v.<java.text.ParsePosition: void setIndex(int)>(v);
return null;
label:
v = virtualinvoke v.<java.text.ParsePosition: int getIndex()>();
v = staticinvoke <org.apache.commons.math.util.CompositeFormat: char parseNextCharacter(java.lang.String,java.text.ParsePosition)>(v, v);
lookupswitch(v)
{
case 0: goto label;
case 43: goto label;
case 45: goto label;
default: goto label;
};
label:
v = new org.apache.commons.math.complex.Complex;
v = virtualinvoke v.<java.lang.Number: double doubleValue()>();
specialinvoke v.<org.apache.commons.math.complex.Complex: void <init>(double,double)>(v, 0.0);
return v;
label:
v = -1;
goto label;
label:
v = 1;
goto label;
label:
virtualinvoke v.<java.text.ParsePosition: void setIndex(int)>(v);
virtualinvoke v.<java.text.ParsePosition: void setErrorIndex(int)>(v);
return null;
label:
staticinvoke <org.apache.commons.math.util.CompositeFormat: void parseAndIgnoreWhitespace(java.lang.String,java.text.ParsePosition)>(v, v);
v = virtualinvoke v.<org.apache.commons.math.complex.ComplexFormat: java.text.NumberFormat getRealFormat()>();
v = staticinvoke <org.apache.commons.math.util.CompositeFormat: java.lang.Number parseNumber(java.lang.String,java.text.NumberFormat,java.text.ParsePosition)>(v, v, v);
if v != null goto label;
virtualinvoke v.<java.text.ParsePosition: void setIndex(int)>(v);
return null;
label:
v = virtualinvoke v.<org.apache.commons.math.complex.ComplexFormat: java.lang.String getImaginaryCharacter()>();
v = staticinvoke <org.apache.commons.math.util.CompositeFormat: boolean parseFixedstring(java.lang.String,java.lang.String,java.text.ParsePosition)>(v, v, v);
if v != 0 goto label;
return null;
label:
v = new org.apache.commons.math.complex.Complex;
v = virtualinvoke v.<java.lang.Number: double doubleValue()>();
v = virtualinvoke v.<java.lang.Number: double doubleValue()>();
v = v * v;
specialinvoke v.<org.apache.commons.math.complex.Complex: void <init>(double,double)>(v, v);
return v;
}
}