|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object fr.cnes.sirius.patrius.events.CodedEvent
public final class CodedEvent
This class represents an event occurrence.
An event is identified by a code (its name), the date of occurrence, a string representing a comment and a flag that
indicates if the event is a "starting" event (i.e. an event that starts a phenomenon, like an eclipse) or an "ending"
event.
Coded events are built by the CodingEventDetector
during propagation using the
buildCodedEvent
method.
CodingEventDetector
,
CodedEventsList
Constructor Summary | |
---|---|
CodedEvent(String codeIn,
String commentIn,
AbsoluteDate dateIn,
boolean startingEventIn)
Constructor for the coded event. |
Method Summary | |
---|---|
static CodedEvent |
buildUndefinedEvent(AbsoluteDate date,
boolean isStarting)
Factory method for an undefined event, that still has a valid date. |
int |
compareTo(CodedEvent event)
Compares two CodedEvent instances.The ordering for CodedEvent is consistent with equals,
so that a CodedEvent can be used in any SortedSet or SortedMap .The ordering is : the ordering of the events' dates if they differ. if not, the alphabetical ordering of the code is used if they differ. if not, the alphabetical ordering of the comment is used if they differ. if not, the starting boolean is used (the starting event is "before"). |
boolean |
equals(Object event)
Checks if the instance represents the same CodedEvent as another
instance. |
String |
getCode()
|
String |
getComment()
|
AbsoluteDate |
getDate()
Get the date. |
int |
hashCode()
|
boolean |
isStartingEvent()
|
String |
toString()
Provides a String representation, based on this pattern : "<date> - <(Beg) or (End)> - <code> : <comment>". |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CodedEvent(String codeIn, String commentIn, AbsoluteDate dateIn, boolean startingEventIn)
codeIn
- code identifying the event.commentIn
- comment for the event.dateIn
- the AbsoluteDate
of the event.startingEventIn
- true if the event is a "starting" event, false if it is
an "ending" event.Method Detail |
---|
public String getCode()
public String getComment()
public AbsoluteDate getDate()
TimeStamped
getDate
in interface TimeStamped
AbsoluteDate
of the event.TimeStamped.getDate()
public boolean isStartingEvent()
public int compareTo(CodedEvent event)
CodedEvent
instances.CodedEvent
is consistent with equals,
so that a CodedEvent
can be used in any SortedSet
or SortedMap
.
compareTo
in interface Comparable<CodedEvent>
event
- the CodedEvent
to compare to
CodedEvent
is before, simultaneous, or after the specified
event.Comparable.compareTo(java.lang.Object)
public static CodedEvent buildUndefinedEvent(AbsoluteDate date, boolean isStarting)
date
- the AbsoluteDate
of the event, needed even for an
undefined event.isStarting
- true when the event is a "starting" event.
CodedEvent
.public String toString()
toString
in class Object
Object.toString()
public boolean equals(Object event)
CodedEvent
as another
instance.
equals
in class Object
event
- other event
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |