Java tutorial
//package com.java2s; //License from project: Apache License import android.os.Bundle; import java.io.Serializable; import java.util.List; public class Main { public static <T extends Serializable> Bundle putArguments(Bundle bundle, String key, List<T> objects) { for (int i = 0; i < objects.size(); i++) { bundle.putSerializable(String.format("%s%s", key, i), objects.get(i)); } return bundle; } }