Note#
A non-fatal note about the input of a scheduling call: a task, link or assignment that was left out of the plan, or a field that repair validation changed. Notes are listed in ScheduleResult.notes. Nothing is thrown for them.
Note is an abstract class with four nested static subclasses, one per variant. Read a note with instanceof patterns or switch pattern matching on the nested classes.
Declaration#
;
The class isn't sealed, but the four nested classes are the only variants the library produces. A switch over a Note needs a default branch to compile.
Like every record, a note has public mutable fields, copy() (shallow; each subclass returns its own type), and structural equals / hashCode / toString from ValueRecord.
Variants#
| Variant | When it occurs |
|---|---|
DroppedLink |
A link isn't part of the plan, for example because one of its tasks is unscheduled. |
DroppedTask |
A task isn't part of the plan because it's unscheduled. |
DroppedAssignment |
An assignment isn't part of the plan because its task is unscheduled. |
Repaired |
Validation.REPAIR changed an input field. |
DroppedLink#
public
| Field | Type | Description |
|---|---|---|
link |
Id |
Id of the dropped link. |
reason |
String |
Human-readable reason, e.g. target task "3" is unscheduled. |
DroppedTask#
public
| Field | Type | Description |
|---|---|---|
task |
Id |
Id of the dropped task. |
reason |
String |
Human-readable reason: unscheduled. |
A task is unscheduled when TaskData.unscheduled is true.
DroppedAssignment#
public
| Field | Type | Description |
|---|---|---|
assignment |
Id |
Id of the dropped assignment. |
reason |
String |
Human-readable reason, e.g. task "3" is unscheduled. |
Repaired#
public
| Field | Type | Description |
|---|---|---|
path |
String |
Input path of the changed field, in wire spelling, e.g. tasks[1].start_date. |
message |
String |
What was wrong and how it was fixed. |
Only a project created with Validation.REPAIR reports Repaired notes. The list of fixes and their paths is on Validation.
Example#
;
;
Related#
ScheduleResult- the result that lists notesValidation- the mode that producesRepairednotes- Reading results - reading cycles and notes
- Accept messy input - repair validation in practice