package nl.tudelft.simulation.dsol.swing.gui.inputparameters;
import nl.tudelft.simulation.dsol.model.inputparameters.InputParameter;
/**
* Abstract InputField to avoid code duplication.
*
* Copyright (c) 2003-2022 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See
* for project information www.simulation.tudelft.nl. The
* source code and binary code of this software is proprietary information of Delft University of Technology.
* @author Alexander Verbraeck
*/
public abstract class AbstractInputField implements InputField
{
/** key for the field. */
@SuppressWarnings("checkstyle:visibilitymodifier")
public String key;
/** field for the input parameter. */
@SuppressWarnings("checkstyle:visibilitymodifier")
public InputParameter, ?> parameter;
/**
* Abstract constructor for the field on the screen.
* @param parameter InputParameter<?,?>; the parameter
*/
public AbstractInputField(final InputParameter, ?> parameter)
{
this.parameter = parameter;
this.key = parameter.getKey();
}
/** {@inheritDoc} */
@Override
public String getKey()
{
return this.key;
}
/** {@inheritDoc} */
@Override
public InputParameter, ?> getParameter()
{
return this.parameter;
}
}