Skip to content

Commit

Permalink
minor update to usages of getLast()
Browse files Browse the repository at this point in the history
I am getting an error saying it doesn't exist on ArrayList, and neither does getFirst. StackOverflow was saying it isn't defined on ArrayList either???
  • Loading branch information
pranav-super committed Oct 24, 2024
1 parent cea3b09 commit 0fcc5f2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ protected Goal fill(Goal goal) {
if (this.resourceConstraints.size() > 1) {
goal.resourceConstraints = new And(resourceConstraints);
} else {
goal.resourceConstraints = resourceConstraints.getFirst();
goal.resourceConstraints = resourceConstraints.get(0);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ private Optional<MissingActivityNetworkConflict> makeActivityNetworkConflict(
curPreviouslyInstantiated = null;
}
taskNetwork.startsAfterStart(
allActivitiesInNetwork.get(allActivitiesInNetwork.size()),
allActivitiesInNetwork.get(allActivitiesInNetwork.size()-1),
activityName,
missingRecurrenceConflict.minMaxConstraints.start,
missingRecurrenceConflict.minMaxConstraints.end);
Expand All @@ -634,12 +634,12 @@ private Optional<MissingActivityNetworkConflict> makeActivityNetworkConflict(
//add constraints between last task and end boundary
if (missingRecurrenceConflict.afterBoundIsActivity) {
taskNetwork.addStartInterval(
allActivitiesInNetwork.get(allActivitiesInNetwork.size()),
allActivitiesInNetwork.get(allActivitiesInNetwork.size()-1),
missingRecurrenceConflict.nextStart.minus(missingRecurrenceConflict.minMaxConstraints.end),
missingRecurrenceConflict.nextStart.minus(missingRecurrenceConflict.minMaxConstraints.start));
} else {
taskNetwork.addStartInterval(
allActivitiesInNetwork.get(allActivitiesInNetwork.size()),
allActivitiesInNetwork.get(allActivitiesInNetwork.size()-1),
missingRecurrenceConflict.nextStart.minus(missingRecurrenceConflict.minMaxConstraints.end) ,
missingRecurrenceConflict.nextStart);
}
Expand Down

0 comments on commit 0fcc5f2

Please sign in to comment.