All Downloads are FREE. Search and download functionalities are using the official Maven repository.

examplecalculator.objectmodel.ElementNumber Maven / Gradle / Ivy

The newest version!
package examplecalculator.objectmodel;

import static examplecalculator.objectmodel.Element.TypeElement.NUMBER;

public final class ElementNumber implements Element {
    private String element;
    private Double value;

    public ElementNumber(String element) {
        this.element = element;
        this.value = Double.parseDouble(element);
    }

    @Override
    public Double getValue() {
        return value;
    }

    @Override
    public String getElement() {
        return element;
    }

    @Override
    public void setValue(Double value) {
        this.value = value;
    }

    @Override
    public void setElement(String element) {
        this.element = element;
    }

    @Override
    public TypeElement getTypeElement() {
        return NUMBER;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy