<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">/**
 * A parameterized (i.e., type-safe) encapsulation of an Identified entity.
 *
 * @author  Prof. David Bernstein, James Madison University
 */
public class Identified&lt;T&gt;
{
    private int       id;
    private T         entity;
    
    /**
     * Explicit Value Constructor.
     *
     * @param id      The unique identifier for the entity
     * @param entity  The entity
     */
    public Identified(int id, T entity)
    {
        this.id     = id;
        this.entity = entity;
    }
    
    /**
     * Get the ID of this Identified entity.
     *
     * @return   The ID
     */
    public int getID()
    {
        return id;
    }

    /**
     * Get the entity.
     *
     * @return   The entity
     */
    public T getEntity()
    {
        return entity;
    }
}
</pre></body></html>