Package org.ivoa.vodml.stdtypes
Class Complex
- java.lang.Object
-
- org.ivoa.vodml.stdtypes.Complex
-
@VoDml(id="ivoa:complex", role=primitiveType, type="ivoa:complex") @Embeddable public class Complex extends java.lang.Object
UML PrimitiveType complex : Represents a complex number, consisting of a real and imaginary component, both of which are reals. Note that in many contexts there is no native mapping for this type and it must be treated with a custom mapping.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetIm()doublegetRe()voidsetIm(double im)voidsetRe(double re)java.lang.StringtoString()Return the string representation.
-
-
-
Constructor Detail
-
Complex
public Complex(double _re, double _im)Creates a new complex Primitive Type instance, wrapping a base type.- Parameters:
_re- real part_im- imqginary part
-
Complex
public Complex(java.lang.String sv)
TODO Implement better parser- Parameters:
sv- a string representation of the complex number.
-
Complex
public Complex()
-
-
Method Detail
-
toString
public final java.lang.String toString()
Return the string representation.- Overrides:
toStringin classjava.lang.Object- Returns:
- string representation of the complex.
-
getRe
public double getRe()
-
getIm
public double getIm()
-
setRe
public void setRe(double re)
-
setIm
public void setIm(double im)
-
-