We use here the topologists definition of the 1-sphere (see Sphere on MathWorld), i.e. the 1-sphere is the one-dimensional closed curve defined in 2D as x2+y2=1.
| Modifier and Type | Class and Description |
|---|---|
| private static class | Sphere1D.
Holder for the instance. |
| public static class | Sphere1D.
Specialized exception for inexistent sub-space. |
| 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 int | getDimension()
Implements org. Get the dimension of the space. |
| public static Sphere1D | |
| public Space | Returns: nothingImplements org. Get the n-1 dimension subspace of this space. |
| private Object |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Serializable version identifier. | |
| Sphere1D | back to summary |
|---|---|
| private Sphere1D() Private constructor for the singleton. | |
| getDimension | back to summary |
|---|---|
| public int getDimension() Implements org. Doc from org. Get the dimension of the space.
| |
| getInstance | back to summary |
|---|---|
| public static Sphere1D getInstance() Get the unique instance.
| |
| getSubSpace | back to summary |
|---|---|
| public Space getSubSpace() throws NoSubSpaceException Implements org. Doc from org. Get the n-1 dimension subspace of this space.
As the 1-dimension sphere does not have proper sub-spaces,
this method always throws a
| |
| 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 Sphere1D | INSTANCE
Cached field instance. |
| Access | Constructor and Description |
|---|---|
| private |
| INSTANCE | back to summary |
|---|---|
| private static final Sphere1D INSTANCE Cached field instance. | |
| LazyHolder | back to summary |
|---|---|
| private LazyHolder() | |
This exception is thrown when attempting to get the sub-space of a one-dimensional space
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| public |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides org. Serializable UID. | |
| NoSubSpaceException | back to summary |
|---|---|
| public NoSubSpaceException() Simple constructor. | |