parsing a file to create objects in java
<p>I have a file with is the output of an trading agent's activities. For example:</p>

<pre><code>222666:org.powertac.common.Order::171875::new::21::165482::-35.74395569719625::35.0
222666:org.powertac.common.Order::171876::new::21::165893::-35.74395569719625::35.0
</code></pre>

<p>The class <code>Order</code> is defined as:</p>

<pre><code>  public Order (Broker broker, Timeslot timeslot,
                double mWh, Double limitPrice)
  {
    super();
    this.broker = broker;
    this.timeslot = timeslot;
    this.mWh = mWh;
    this.limitPrice = limitPrice;
  }
</code></pre>

<p>so from the file I have:</p>

<pre><code>&lt;id&gt;:&lt;package_name&gt;::&lt;execution_id&gt;::&lt;new object&gt;::&lt;args_list&gt;
</code></pre>

<p>However, there is some examples like:</p>

<pre><code>222665:org.powertac.genco.Genco::21::setCurrentCapacity::35.74395569719625
222665:org.powertac.genco.Genco::21::setInOperation::true
</code></pre>

<p>so instead of creating a <code>new</code> object, I have to call the method <code>setCurrentCapacity</code> with the <code>35.7439..</code> parameter.
My goal is to create a </p>

<pre><code>Map&lt;Integer, Object&gt; map = new Map&lt;Integer, Object&gt;();
</code></pre>

<p>that's it, a <code>Map</code> between <code>Integer id</code> and <code>Object</code>. Thus, if I want to reproduce the agent activity again, I would just process the <code>Map</code> Object. I was wondering what would be the best approach to achieve my goal. Do I have to actually create the <code>Genco</code> object, for example, and cast it to <code>Object</code> before storing on the <code>Map</code>?  How do I set the function call? I mean, how do I create the <code>Genco</code> object and tell it to call <code>setInOperation</code> in the <code>Map</code>? Also, what does it mean and how could I handle values like:</p>

<pre><code>300:org.powertac.du.DefaultBrokerService$LocalBroker::1::new::default broker
300:org.powertac.du.DefaultBrokerService$LocalBroker::1::setLocal::true
</code></pre>

<p>with the <code>$</code> symbol?</p>
