Team
アプリで型のオブジェクトを別の型に渡そうとしていますActivity
。
Team
クラス:
public class Team implements Parcelable {
String teamName;
//Name and Link to competition of Team
TreeMap<String, String> competitions;
//Name of competition with a map of matchdays with all games to a matchday
TreeMap<String, HashMap<Integer, ArrayList<Event>>> matchDays;
public int describeContents() {
return 0;
}
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(teamName);
dest.writeMap(competitions);
}
public static final Parcelable.Creator<Team> CREATOR = new Parcelable.Creator<Team>() {
public Team createFromParcel(Parcel in) {
return new Team(in);
}
public Team[] newArray(int size) {
return new Team[size];
}
};
private Team(Parcel in) {
teamName = in.readString();
in.readMap(competitions, Team.class.getClassLoader());
}
}
マーシャリング時に RuntimeException が発生します。
TreeMap<String, HashMap<Integer, ArrayList<Event>>> matchDays;
ネストされた TreeMap をクラスの残りの部分と一緒に渡すにはどうすればよいですか?