title: Convert or Cast a Simple Object to Object of another class
body: <p>I've an object pObject </p>
  
  <p><code>Object pObject = someRpcCall();</code></p>
  
  <p>I don't know the type of <code>pObject</code></p>
  
  <p>What i know is <code>System.out.println(pObject.toString())</code> outputs</p>
  
  <pre><code>{partner_shipping_id=12, partner_order_id=11, user_id=1, partner_invoice_id=13, pricelist_id=1, fiscal_position=false, payment_term=false}
  </code></pre>
  
  <p>How can I convert this pObject to object of the following class</p>
  
  <pre><code>import android.os.Parcel;
  import android.os.Parcelable;
  public class Customer implements Parcelable {
  
      private int id;
      private String name = "";
  
      public Customer() {
          // TODO Auto-generated constructor stub
      }
  
      /**
       * This will be used only by the MyCreator
       * 
       * @param source
       */
      public Customer(Parcel source) {
          /*
           * Reconstruct from the Parcel
           */
          id = source.readInt();
          name = source.readString();
      }
  
      public void setId(int id) {
          this.id = id;
      }
  
      public void setName(String name) {
          this.name = name;
      }
  
      public int getId() {
          return this.id;
      }
  
      public String getName() {
          return this.name;
      }
  
      @Override
      public int describeContents() {
          return 0;
      }
  
      @Override
      public void writeToParcel(Parcel dest, int flags) {
          dest.writeInt(id);
          dest.writeString(name);
      }
  
      public static final Parcelable.Creator CREATOR = new Parcelable.Creator() {
  
          @Override
          public Customer createFromParcel(Parcel source) {
              return new Customer(source);
          }
  
          @Override
          public Customer[] newArray(int size) {
              return new Customer[size];
              // TODO Auto-generated method stub
          }
  
      };
  
  }
  </code></pre>