watch
Class Imputation

java.lang.Object
  extended by watch.Commentable
      extended by watch.Imputation

 class Imputation
extends Commentable

Imputation model class.


Constructor Summary
Imputation(Task W_Task, User W_User, Date W_Date, double D_Imputed)
          Constructor.
 
Method Summary
 Date getDate()
          Date of imputation accessor.
 double getImputed()
          Imputation value accessor.
 Task getTask()
          Imputed task accessor.
 User getUser()
          User who has completed the imputation accessor.
 boolean matches(User.Map W_Users, Date W_StartDate, Date W_EndDate)
          Imputation matching predicate.
 java.lang.String toString()
          String representation of the imputation.
 
Methods inherited from class watch.Commentable
getComments
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Imputation

public Imputation(Task W_Task,
                  User W_User,
                  Date W_Date,
                  double D_Imputed)
Constructor.

Parameters:
W_Task - Task imputed.
W_User - User who has completed the imputation. If null, the imputation is not attached to any user.
W_Date - Date of the imputation.
D_Imputed - Value of the imputation.
Method Detail

toString

public java.lang.String toString()
String representation of the imputation.

Overrides:
toString in class java.lang.Object
Returns:
The string representation of the imputation.

getTask

public Task getTask()
Imputed task accessor.

Returns:
The task imputed.

getUser

public User getUser()
User who has completed the imputation accessor.

Returns:
The user who has completed the imputation.

getDate

public Date getDate()
Date of imputation accessor.

Returns:
The date of the imputation.

getImputed

public double getImputed()
Imputation value accessor.

Returns:
The value of the imputation.

matches

public boolean matches(User.Map W_Users,
                       Date W_StartDate,
                       Date W_EndDate)
Imputation matching predicate. Determines whether the imputation corresponds to the user, the start and end date given.

Parameters:
W_Users - User predicate. If null or empty, the predicate is not taken in account.
W_StartDate - The date the imputation will be checked to be after. Must not be null.
W_EndDate - The date the imputation will be checked to be before. Must not be null.
Returns:
true if all predicates are matched, false otherwise.