Top Description Inners Fields Constructors Methods
org.apache.commons.math3.complex

public Class ComplexField

extends Object
implements Field<Complex>, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, org.apache.commons.math3.Field
Imports
java.io.Serializable, org.apache.commons.math3.Field, .FieldElement

Representation of the complex numbers field.

This class is a singleton.

Since
2.0
See Also
Complex

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
ComplexField.LazyHolder

Holder for the instance.

Field Summary

Modifier and TypeField and Description
private static final long
serialVersionUID

Serializable version identifier.

Constructor Summary

AccessConstructor and Description
private
ComplexField()

Private constructor for the singleton.

Method Summary

Modifier and TypeMethod and Description
public static ComplexField

Returns:

the unique instance
getInstance
()

Get the unique instance.

public Complex
getOne()

Implements org.apache.commons.math3.Field.getOne.

Get the multiplicative identity of the field.

public Class<? extends FieldElement<Complex>>
getRuntimeClass()

Implements org.apache.commons.math3.Field.getRuntimeClass.

Returns the runtime class of the FieldElement.

public Complex
getZero()

Implements org.apache.commons.math3.Field.getZero.

Get the additive identity of the field.

private Object

Returns:

the singleton instance
readResolve
()

Handle deserialization of the singleton.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Serializable version identifier.

Constructor Detail

ComplexFieldback to summary
private ComplexField()

Private constructor for the singleton.

Method Detail

getInstanceback to summary
public static ComplexField getInstance()

Get the unique instance.

Returns:ComplexField

the unique instance

getOneback to summary
public Complex getOne()

Implements org.apache.commons.math3.Field.getOne.

Doc from org.apache.commons.math3.Field.getOne.

Get the multiplicative identity of the field.

The multiplicative identity is the element e1 of the field such that for all elements a of the field, the equalities a × e1 = e1 × a = a hold.

Returns:Complex

multiplicative identity of the field

getRuntimeClassback to summary
public Class<? extends FieldElement<Complex>> getRuntimeClass()

Implements org.apache.commons.math3.Field.getRuntimeClass.

Doc from org.apache.commons.math3.Field.getRuntimeClass.

Returns the runtime class of the FieldElement.

Returns:Class<? extends FieldElement<Complex>>

The Class object that represents the runtime class of this object.

getZeroback to summary
public Complex getZero()

Implements org.apache.commons.math3.Field.getZero.

Doc from org.apache.commons.math3.Field.getZero.

Get the additive identity of the field.

The additive identity is the element e0 of the field such that for all elements a of the field, the equalities a + e0 = e0 + a = a hold.

Returns:Complex

additive identity of the field

readResolveback to summary
private Object readResolve()

Handle deserialization of the singleton.

Returns:Object

the singleton instance

org.apache.commons.math3.complex back to summary

private Class ComplexField.LazyHolder

extends Object
Class Inheritance

Holder for the instance.

We use here the Initialization On Demand Holder Idiom.

Field Summary

Modifier and TypeField and Description
private static final ComplexField
INSTANCE

Cached field instance.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
private static final ComplexField INSTANCE

Cached field instance.

Constructor Detail

LazyHolderback to summary
private LazyHolder()