When might a clone not be the type of the original object?
<p>I have a class that stores certain events and gives out clones, but Eclipse (my IDE) gives me unchecked clone warnings:</p>

<pre><code>import java.util.*;
import java.awt.event.*;

public PlayerEvents {

    private final ArrayList&lt;KeyEvent&gt; keyevents;
    private final ArrayList&lt;MouseEvent&gt; mouseevents;

    @SuppressWarnings("unchecked") // I have to do this to keep the IDE quiet
    public PlayerEvents(ArrayList&lt;KeyEvent&gt; keyevents, ArrayList&lt;MouseEvent&gt; mouseevents) {
        this.keyevents = (ArrayList&lt;KeyEvent&gt;) keyevents.clone(); // Type safety: Unchecked cast from Object to ArrayList&lt;KeyEvent&gt;
        this.mouseevents = (ArrayList&lt;MouseEvent&gt;) mouseevents.clone(); // Type safety: Unchecked cast from Object to ArrayList&lt;KeyEvent&gt;
    }

    // More code...

}
</code></pre>

<p>When would a cloned object <strong>not</strong> be its source, i.e. when will a cloned <code>keyevent</code> not be the type of <code>keyevent</code>? </p>

<p><strong>Edit:</strong> Furthermore, why does the .clone() object give an Object? Does this have to do with the limitations of the Java language?</p>

<p>I'm using Eclipse Mars (4.5.2) with Java 1.8.0_91.</p>