// Module    : $RCSfile: AbstractDefaultGUIElement.java,v $
// Version   : $Revision: 0.0 $  $Author: Patrick $  $Date: 27.11.2011 17:21:28 $
// Project   : TaskTreePerformanceTest
// Creation  : 2011 by Patrick
// Copyright : Patrick Harms, 2011

package de.ugoe.cs.quest.eventcore.guimodel;

/**
 * TODO comment
 * 
 * @version $Revision: $ $Date: $
 * @author 2011, last modified by $Author: $
 */
public abstract class AbstractDefaultGUIElement implements IGUIElement {
    
    /**  */
    public static final long serialVersionUID = 1L;

    /** the specification of the GUI element */
    private IGUIElementSpec specification;

    /** the reference to the parent element */
    private IGUIElement parent;

    /**
     * <p>
     * TODO: comment
     * </p>
     *
     * @param specification
     */
    public AbstractDefaultGUIElement(IGUIElementSpec specification, IGUIElement parent) {
        this.specification = specification;
        this.parent = parent;
    }

    /*
     * (non-Javadoc)
     * 
     * @see de.ugoe.cs.tasktree.guimodel.GUIElement#getSpecification()
     */
    @Override
    public IGUIElementSpec getSpecification() {
        return specification;
    }

    /* (non-Javadoc)
     * @see de.ugoe.cs.quest.eventcore.guimodel.IGUIElement#getParent()
     */
    @Override
    public IGUIElement getParent() {
        return parent;
    }

    /*
     * (non-Javadoc)
     * 
     * @see GUIElement#equals(GUIElement)
     */
    public final boolean equals(Object other) {
        // implement final, as GUI elments are all singletons and the equal only if they are the
        // same object
        return super.equals(other);
    }

    /* (non-Javadoc)
     * @see java.lang.Object#hashCode()
     */
    @Override
    public final int hashCode() {
        // implement final, as GUI elments are all singletons and the equal only if they are the
        // same object
        return super.hashCode();
    }

}
