stella
Class AbstractTarget.PickAdapter

java.lang.Object
  extended by stella.AbstractTarget.PickAdapter
All Implemented Interfaces:
Serializable, Comparable<HistoryAware.Pick>, HistoryAware.Pick
Enclosing class:
AbstractTarget

public static class AbstractTarget.PickAdapter
extends Object
implements HistoryAware.Pick, Serializable, Comparable<HistoryAware.Pick>

The implementation of the HistoryAware#Pick interface. All relevant data is supplied at construct.

See Also:
Serialized Form

Field Summary
private  String comment
          A comment to this observation.
private  boolean complete
          The completeness flag.
private  long duration
          The duration of the observation in ms.
private  double merit
          The merit as the target was picked.
private  Date start
          The time of the observation start.
private  boolean success
          The success flag.
private  String unique
          The unique identifier of this observation.
 
Constructor Summary
AbstractTarget.PickAdapter(boolean suc, Date begin, long elapse, String data, double pickmerit, String remark)
          Constructs a new pick.
 
Method Summary
 int compareTo(HistoryAware.Pick that)
          Two picks are compared by comparing their date.
 String getComment()
          Returns the commant assigned to this pick.
 Date getDate()
          Returns the starting date of the observation.
 long getDuration()
          Returns the duration of this pick in ms.
 double getPickMerit()
          Returns the merit the target gained at this pick.
 String getUnique()
          Returns the URL of the observation data.
 boolean isSuccess()
          Returns true if the pick was successful.
 boolean setSuccess(boolean wasgood)
          Sets the success flag.
 String toString()
          Returns a string version.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

success

private boolean success
The success flag.


complete

private boolean complete
The completeness flag.


start

private Date start
The time of the observation start.


duration

private long duration
The duration of the observation in ms.


unique

private String unique
The unique identifier of this observation.


merit

private double merit
The merit as the target was picked.


comment

private String comment
A comment to this observation. Null if not specified.

Constructor Detail

AbstractTarget.PickAdapter

public AbstractTarget.PickAdapter(boolean suc,
                                  Date begin,
                                  long elapse,
                                  String data,
                                  double pickmerit,
                                  String remark)
Constructs a new pick. All paramters supplied must be true references except the comment, which may be null. To indicate non-defined S/N values, supply a negative value. The completeness is always false at construct and may be changed later with a call to #changeProgramComplete

Method Detail

compareTo

public int compareTo(HistoryAware.Pick that)
Two picks are compared by comparing their date.

Specified by:
compareTo in interface Comparable<HistoryAware.Pick>

isSuccess

public boolean isSuccess()
Returns true if the pick was successful.

Specified by:
isSuccess in interface HistoryAware.Pick

setSuccess

public boolean setSuccess(boolean wasgood)
Sets the success flag.

Specified by:
setSuccess in interface HistoryAware.Pick

getDate

public Date getDate()
Returns the starting date of the observation. This implementation always returns the starting date of an observation.

Specified by:
getDate in interface HistoryAware.Pick

getDuration

public long getDuration()
Returns the duration of this pick in ms.

Specified by:
getDuration in interface HistoryAware.Pick

getUnique

public String getUnique()
Returns the URL of the observation data.

Specified by:
getUnique in interface HistoryAware.Pick

getPickMerit

public double getPickMerit()
Returns the merit the target gained at this pick.

Specified by:
getPickMerit in interface HistoryAware.Pick

getComment

public String getComment()
Returns the commant assigned to this pick.

Specified by:
getComment in interface HistoryAware.Pick

toString

public String toString()
Returns a string version.

Overrides:
toString in class Object