BrightSide Workbench Full Report + Source Code
org.turro.scheduler.task.constraints.TaskConstraints Class Reference

Public Member Functions

DayOfMonthConstraint getDaysOfMonth ()
 
HourConstraint getHours ()
 
MinuteConstraint getMinutes ()
 
MonthConstraint getMonths ()
 
WeekDayConstraint getWeekDays ()
 
boolean isValid (Date date)
 
boolean needsRefresh ()
 
boolean isEmpty ()
 
int hashCode ()
 
boolean equals (Object obj)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 28 of file TaskConstraints.java.

Member Function Documentation

◆ equals()

boolean org.turro.scheduler.task.constraints.TaskConstraints.equals ( Object  obj)

Definition at line 99 of file TaskConstraints.java.

99  {
100  if (this == obj) {
101  return true;
102  }
103  if (obj == null) {
104  return false;
105  }
106  if (getClass() != obj.getClass()) {
107  return false;
108  }
109  final TaskConstraints other = (TaskConstraints) obj;
110  if (!Objects.equals(this.months, other.months)) {
111  return false;
112  }
113  if (!Objects.equals(this.daysOfMonth, other.daysOfMonth)) {
114  return false;
115  }
116  if (!Objects.equals(this.weekDays, other.weekDays)) {
117  return false;
118  }
119  if (!Objects.equals(this.hours, other.hours)) {
120  return false;
121  }
122  return Objects.equals(this.minutes, other.minutes);
123  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDaysOfMonth()

DayOfMonthConstraint org.turro.scheduler.task.constraints.TaskConstraints.getDaysOfMonth ( )

Definition at line 36 of file TaskConstraints.java.

36  {
37  return daysOfMonth;
38  }
Here is the caller graph for this function:

◆ getHours()

HourConstraint org.turro.scheduler.task.constraints.TaskConstraints.getHours ( )

Definition at line 40 of file TaskConstraints.java.

40  {
41  return hours;
42  }
Here is the caller graph for this function:

◆ getMinutes()

MinuteConstraint org.turro.scheduler.task.constraints.TaskConstraints.getMinutes ( )

Definition at line 44 of file TaskConstraints.java.

44  {
45  return minutes;
46  }
Here is the caller graph for this function:

◆ getMonths()

MonthConstraint org.turro.scheduler.task.constraints.TaskConstraints.getMonths ( )

Definition at line 48 of file TaskConstraints.java.

48  {
49  return months;
50  }
Here is the caller graph for this function:

◆ getWeekDays()

WeekDayConstraint org.turro.scheduler.task.constraints.TaskConstraints.getWeekDays ( )

Definition at line 52 of file TaskConstraints.java.

52  {
53  return weekDays;
54  }
Here is the caller graph for this function:

◆ hashCode()

int org.turro.scheduler.task.constraints.TaskConstraints.hashCode ( )

Definition at line 88 of file TaskConstraints.java.

88  {
89  int hash = 5;
90  hash = 37 * hash + Objects.hashCode(this.months);
91  hash = 37 * hash + Objects.hashCode(this.daysOfMonth);
92  hash = 37 * hash + Objects.hashCode(this.weekDays);
93  hash = 37 * hash + Objects.hashCode(this.hours);
94  hash = 37 * hash + Objects.hashCode(this.minutes);
95  return hash;
96  }
Here is the caller graph for this function:

◆ isEmpty()

boolean org.turro.scheduler.task.constraints.TaskConstraints.isEmpty ( )

Definition at line 80 of file TaskConstraints.java.

80  {
81  return months.isEmpty() && daysOfMonth.isEmpty() &&
82  weekDays.isEmpty() && hours.isEmpty() && minutes.isEmpty();
83  }
Here is the caller graph for this function:

◆ isValid()

boolean org.turro.scheduler.task.constraints.TaskConstraints.isValid ( Date  date)

Definition at line 56 of file TaskConstraints.java.

56  {
57  if(isEmpty()) {
58  return false;
59  }
60  boolean valid = months.isValid(date);
61  if(valid) valid = daysOfMonth.isValid(date);
62  if(valid) valid = weekDays.isValid(date);
63  if(valid) valid = hours.isValid(date);
64  if(valid) valid = minutes.isValid(date);
65  return valid;
66  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ needsRefresh()

boolean org.turro.scheduler.task.constraints.TaskConstraints.needsRefresh ( )

Definition at line 68 of file TaskConstraints.java.

68  {
69  if(isEmpty()) {
70  return false;
71  }
72  boolean refresh = months.needsRefresh();
73  if(!refresh) refresh = daysOfMonth.needsRefresh();
74  if(!refresh) refresh = weekDays.needsRefresh();
75  if(!refresh) refresh = hours.needsRefresh();
76  if(!refresh) refresh = minutes.needsRefresh();
77  return refresh;
78  }
Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: