mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
clean up
This commit is contained in:
parent
af69361cd4
commit
7351a05730
1 changed files with 5 additions and 6 deletions
|
|
@ -46,8 +46,7 @@ public class TourActivities {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasNext() {
|
public boolean hasNext() {
|
||||||
if (currentIndex >= 0) return true;
|
return currentIndex >= 0;
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -67,9 +66,9 @@ public class TourActivities {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private final ArrayList<TourActivity> tourActivities = new ArrayList<TourActivity>();
|
private final ArrayList<TourActivity> tourActivities = new ArrayList<>();
|
||||||
|
|
||||||
private final Set<Job> jobs = new HashSet<Job>();
|
private final Set<Job> jobs = new HashSet<>();
|
||||||
|
|
||||||
private ReverseActivityIterator backward;
|
private ReverseActivityIterator backward;
|
||||||
|
|
||||||
|
|
@ -123,7 +122,7 @@ public class TourActivities {
|
||||||
* @return true if job has been removed, otherwise false.
|
* @return true if job has been removed, otherwise false.
|
||||||
*/
|
*/
|
||||||
public boolean removeJob(Job job) {
|
public boolean removeJob(Job job) {
|
||||||
boolean jobRemoved = false;
|
boolean jobRemoved;
|
||||||
if (!jobs.contains(job)) {
|
if (!jobs.contains(job)) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -161,7 +160,7 @@ public class TourActivities {
|
||||||
}
|
}
|
||||||
boolean jobIsAlsoAssociateToOtherActs = false;
|
boolean jobIsAlsoAssociateToOtherActs = false;
|
||||||
boolean actRemoved = false;
|
boolean actRemoved = false;
|
||||||
List<TourActivity> acts = new ArrayList<TourActivity>(tourActivities);
|
List<TourActivity> acts = new ArrayList<>(tourActivities);
|
||||||
for (TourActivity act : acts) {
|
for (TourActivity act : acts) {
|
||||||
if (act == activity) {
|
if (act == activity) {
|
||||||
tourActivities.remove(act);
|
tourActivities.remove(act);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue