How to make my class enabled to cast for Integer
<p>I have a doubt on how to cast my class to <code>Integer</code>. Example:</p>

<pre><code>public class IntegerField extends Field {
    private Integer value;
    public IntegerField(Integer value) {
        super();
        this.value = value;
    }
    public int intValue() {
        return value;
    }
}
</code></pre>

<p>How can I make:</p>

<pre><code>IntegerField a = new IntegerField(8);
Integer b = (Integer) a;
</code></pre>

<p>Thanks! </p>
