This class is a singleton.
Complex
| Modifier and Type | Class and Description |
|---|---|
| private static class | ComplexField.
Holder for the instance. |
| Modifier and Type | Field and Description |
|---|---|
| private static final long | serialVersionUID
Serializable version identifier. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static ComplexField | |
| public Complex | getOne()
Implements org. Get the multiplicative identity of the field. |
| public Class | getRuntimeClass()
Implements org. Returns the runtime class of the FieldElement. |
| public Complex | |
| private Object |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Serializable version identifier. | |
| ComplexField | back to summary |
|---|---|
| private ComplexField() Private constructor for the singleton. | |
| getInstance | back to summary |
|---|---|
| public static ComplexField getInstance() Get the unique instance.
| |
| getOne | back to summary |
|---|---|
| public Complex getOne() Implements org. Doc from org. 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.
| |
| getRuntimeClass | back to summary |
|---|---|
| public Class Implements org. Doc from org. Returns the runtime class of the FieldElement.
| |
| getZero | back to summary |
|---|---|
| public Complex getZero() Implements org. Doc from org. 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.
| |
| readResolve | back to summary |
|---|---|
| private Object readResolve() Handle deserialization of the singleton.
| |
We use here the Initialization On Demand Holder Idiom.
| Modifier and Type | Field and Description |
|---|---|
| private static final ComplexField | INSTANCE
Cached field instance. |
| Access | Constructor and Description |
|---|---|
| private |
| INSTANCE | back to summary |
|---|---|
| private static final ComplexField INSTANCE Cached field instance. | |
| LazyHolder | back to summary |
|---|---|
| private LazyHolder() | |