title: Java: deep copy of object with Runnable member with copy constructor
body: <p>I have a class <code>character</code> that I'd like to create a copy of before a certain event so that if the user screws up he can retry with the copy. To implement this I use the copy constructor like this:</p>
  
  <pre><code>public class character
      implements Serializable
  {
  private String                          name;
  private HashMap&lt;String,Integer&gt;         values = new HashMap&lt;&gt;();
  private ArrayList&lt;String&gt;               traits = new ArrayList&lt;&gt;();
  private enums.playerRelations           playerRelation;
  private static character                playerCharacter = new character();
  private transient Runnable              combatAI;
  private transient Runnable              tradingAI;
  private ArrayList&lt;character&gt;            companions = new ArrayList&lt;&gt;();
  private ArrayList&lt;item&gt;                 inventory = new ArrayList&lt;&gt;();
  private int                             maximumInventorySize = 20;
  private int                             maximumSkillSlots = 10;
  private transient ArrayList&lt;Pair&lt;skill,Boolean&gt;&gt;  skills = new ArrayList&lt;&gt;();
  private int                             portraitResource = R.drawable.ic_bear;
  private event                           eventContext;
  
  public character(character o)
  {
      name                    = o.name;
      values                  = new HashMap&lt;&gt;(o.values);
      traits                  = new ArrayList&lt;&gt;(o.traits);
      playerRelation          = o.playerRelation;
      combatAI                = o.combatAI;
      tradingAI               = o.tradingAI;
      companions              = new ArrayList&lt;&gt;(o.companions);
      inventory               = new ArrayList&lt;&gt;(o.inventory);
      maximumInventorySize    = o.maximumInventorySize;
      maximumSkillSlots       = o.maximumSkillSlots;
      skills                  = new ArrayList&lt;&gt;(o.skills);
      portraitResource        = o.portraitResource;
      eventContext            = o.eventContext;
  }
  
  // ...
  }
  </code></pre>
  
  <p>However, I don't know how to deep clone a <code>Runnable</code> object. How can I deep copy those? Is that at all possible using the copy constructor?</p>
  
  <p>I notice that <code>Runnable</code> is different from the other members of <code>character</code> insofar that the part of concern is stored within a function rather than an attribute...</p>