Back to project page 3DR-Services-Library.
The source code is released under:
Apache License
If you think the Android project 3DR-Services-Library listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.ox3dr.services.android.lib.drone.property; /*from w w w. ja va2 s . c o m*/ import android.os.Parcel; import android.os.Parcelable; import java.util.ArrayList; import java.util.List; /** * Holds a set of mavlink mission item messages. */ public class Mission implements Parcelable { private final List<MissionItemMessage> missionItemsList = new ArrayList<MissionItemMessage>(); public void addMissionItemMessage(MissionItemMessage missionItem){ missionItemsList.add(missionItem); } public void removeMissionItemMessage(MissionItemMessage missionItem){ missionItemsList.remove(missionItem); } public void clear(){ missionItemsList.clear(); } public List<MissionItemMessage> getMissionItemMessages(){ return missionItemsList; } @Override public String toString() { return "Mission{" + "missionItemsList=" + missionItemsList + '}'; } @Override public int describeContents() { return 0; } @Override public void writeToParcel(Parcel dest, int flags) { dest.writeTypedList(missionItemsList); } public Mission() { } private Mission(Parcel in) { in.readTypedList(missionItemsList, MissionItemMessage.CREATOR); } public static final Parcelable.Creator<Mission> CREATOR = new Parcelable.Creator<Mission>() { public Mission createFromParcel(Parcel source) { return new Mission(source); } public Mission[] newArray(int size) { return new Mission[size]; } }; }