public Contribution(Parcel in) {
   super(in);
   contentUri = (Uri) in.readParcelable(Uri.class.getClassLoader());
   source = in.readString();
   timestamp = (Date) in.readSerializable();
   state = in.readInt();
   transferred = in.readLong();
   isMultiple = in.readInt() == 1;
 }
 @Override
 public void writeToParcel(Parcel parcel, int flags) {
   super.writeToParcel(parcel, flags);
   parcel.writeParcelable(contentUri, flags);
   parcel.writeString(source);
   parcel.writeSerializable(timestamp);
   parcel.writeInt(state);
   parcel.writeLong(transferred);
   parcel.writeInt(isMultiple ? 1 : 0);
 }
 public static Shipment randomShipment() {
   Shipment s = create(Shipment.class);
   s.setExternalReferenceId(generateKey(7));
   s.setFromAddress(randomAddress());
   s.setToAddress(randomAddress());
   s.setShippingServiceName(randomShippingService().getName());
   for (int i = 0; i < rand.nextInt(5) + 1; i++) {
     Parcel p = create(Parcel.class);
     p.setShipmentId(rand.nextInt(5000));
     p.setContents(randomize(CONTENTS));
     p.setWidth(rand.nextInt(5) + 1);
     p.setHeight(rand.nextInt(5) + 1);
     p.setLength(rand.nextInt(5) + 1);
     p.setWeight(rand.nextInt(5) + 1);
     p.setParcelStatus(randomEnum(ParcelStatus.values()));
     s.getParcels().add(p);
   }
   return (s);
 }
 private BackStackItem(Parcel aIn) {
   path = aIn.readString();
   parentIsBack = aIn.readInt() != 0;
 }
 public void writeToParcel(Parcel out, int flags) {
   out.writeString(path);
   out.writeInt(parentIsBack ? 1 : 0);
 }