public final class Phenomenon extends Object implements Comparable<Phenomenon>, Serializable
This class represents an observable phenomenon.
A phenomenon is represented by a time interval and two boundaries; the boundaries can coincide with two
CodedEvent
, or just be computational boundaries.
Constructor and Description |
---|
Phenomenon(CodedEvent boundaryOne,
boolean boundaryOneDefined,
CodedEvent boundaryTwo,
boolean boundaryTwoDefined,
String codeIn,
String commentIn)
Constructor for the
Phenomenon instance. |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Phenomenon o)
Compares the Phenomenon instances.
|
boolean |
equals(Object phenomenon)
Checks if the instance represents the same
Phenomenon as another instance. |
String |
getCode() |
String |
getComment() |
CodedEvent |
getEndingEvent()
Get the ending event.
|
boolean |
getEndingIsDefined()
True if the second boundary value is defined.
|
CodedEvent |
getStartingEvent()
Get the starting event.
|
boolean |
getStartingIsDefined()
True if the first boundary value is defined.
|
AbsoluteDateInterval |
getTimespan()
Get the timespan as an AbsoluteDateInterval.
|
int |
hashCode() |
String |
toString() |
public Phenomenon(CodedEvent boundaryOne, boolean boundaryOneDefined, CodedEvent boundaryTwo, boolean boundaryTwoDefined, String codeIn, String commentIn)
Phenomenon
instance.CodedEvent
boundaries can be in any time order.boundaryOne
- CodedEvent
representing the first boundary.boundaryOneDefined
- true if the first boundary value is defined, false if is just a meaningless placeholder.boundaryTwo
- CodedEvent
representing the second boundary.boundaryTwoDefined
- true if the second boundary value is defined, false if is just a meaningless placeholder.codeIn
- the phenomenon codecommentIn
- a comment for the phenomenonpublic CodedEvent getStartingEvent()
CodedEvent
instance.public CodedEvent getEndingEvent()
CodedEvent
instance.public boolean getStartingIsDefined()
public boolean getEndingIsDefined()
public AbsoluteDateInterval getTimespan()
public String getCode()
public String getComment()
public int compareTo(Phenomenon o)
compareTo
in interface Comparable<Phenomenon>
o
- the Phenomenon
to compare toPhenomenon
is before, simultaneous, or
after the specified one.Comparable.compareTo(java.lang.Object)
public boolean equals(Object phenomenon)
Phenomenon
as another instance.Copyright © 2019 CNES. All rights reserved.