public class TourActivities extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
TourActivities.ReverseActivityIterator |
| Constructor and Description |
|---|
TourActivities() |
| Modifier and Type | Method and Description |
|---|---|
void |
addActivity(int insertionIndex,
TourActivity act)
Inserts the specified activity add the specified insertionIndex.
|
void |
addActivity(TourActivity act)
Adds specified activity at the end of activity-list.
|
static TourActivities |
copyOf(TourActivities tourActivities) |
List<TourActivity> |
getActivities() |
Collection<Job> |
getJobs() |
boolean |
isEmpty() |
Iterator<TourActivity> |
iterator() |
int |
jobSize()
Returns number of jobs assiciated to activities in this activity sequence.
|
boolean |
removeActivity(TourActivity activity)
Removes activity from this activity sequence.
|
boolean |
removeJob(Job job)
Removes job AND belonging activity from tour.
|
Iterator<TourActivity> |
reverseActivityIterator() |
boolean |
servesJob(Job job) |
String |
toString() |
public static TourActivities copyOf(TourActivities tourActivities)
public List<TourActivity> getActivities()
public Iterator<TourActivity> iterator()
public boolean isEmpty()
public Collection<Job> getJobs()
public boolean servesJob(Job job)
job - that needs to be looked uppublic boolean removeJob(Job job)
job - to be removedpublic boolean removeActivity(TourActivity activity)
activity - to be removedpublic void addActivity(int insertionIndex,
TourActivity act)
If specified activity instanceof JobActivity, it adds job to jobList.
If insertionIndex > tourActivitiies.size(), it just adds the specified act at the end.
insertionIndex - index where activity needs to be insertedact - activity to be insertedIndexOutOfBoundsException - if insertionIndex < 0;public void addActivity(TourActivity act)
If act instanceof JobActivity, it adds underlying job also.
act - to be addedIllegalArgumentException - if activity-list already contains act.public int jobSize()
public Iterator<TourActivity> reverseActivityIterator()
Copyright © 2013–2019. All rights reserved.