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

io.github.mivek.model.trend.AbstractTrend Maven / Gradle / Ivy

package io.github.mivek.model.trend;

import io.github.mivek.enums.WeatherChangeType;
import io.github.mivek.model.AbstractWeatherContainer;
import org.apache.commons.lang3.builder.ToStringBuilder;

/**
 * Abstract class for trends.
 * @author mivek
 */
public abstract class AbstractTrend extends AbstractWeatherContainer {
    /** Type of trend. */
    private WeatherChangeType type;

    /**
     * Constructor.
     * @param pType the type of the trend.
     */
    protected AbstractTrend(final WeatherChangeType pType) {
        type = pType;
    }

    /**
     * @return the type
     */
    public final WeatherChangeType getType() {
        return type;
    }

    /**
     * @return a description of the object
     */
    @Override public String toString() {
        return new ToStringBuilder(this).appendToString(type.toString()).appendSuper(super.toString()).toString();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy