public class Epoch
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable
Constructor and Description |
---|
Epoch(char type,
float year)
Creates an Epoch with any type letter (but it must be 'B' or 'J' to
make sense astronomically).
|
Epoch(float year)
Creates an Epoch assuming the type letter is 'J'.
|
Modifier and Type | Method and Description |
---|---|
Epoch |
clone()
Returns a new Epoch object with the same data.
|
boolean |
equals(java.lang.Object other) |
JulianDate |
getJulianDate()
Returns null if the epoch type is not 'B' or 'J'.
|
char |
getType()
'J' or 'B'.
|
float |
getYear() |
int |
hashCode()
Enable objects of this class to be used as hash keys.
|
java.lang.String |
toString() |
public static final Epoch J2000
public Epoch(float year)
public Epoch(char type, float year)
public float getYear()
public char getType()
public JulianDate getJulianDate()
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public Epoch clone()
clone
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object