public final class CodedEvent extends Object implements TimeStamped, Comparable<CodedEvent>, Serializable
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,
Serialized Form| Constructor and Description |
|---|
CodedEvent(String codeIn,
String commentIn,
AbsoluteDate dateIn,
boolean startingEventIn)
Constructor for the coded event.
|
| Modifier and Type | Method and Description |
|---|---|
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. |
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>".
|
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.public String getCode()
public String getComment()
public AbsoluteDate getDate()
TimeStampedgetDate in interface TimeStampedAbsoluteDate 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 toCodedEvent 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 ObjectObject.toString()public boolean equals(Object event)
CodedEvent as another
instance.Copyright © 2024 CNES. All rights reserved.