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

com.encoway.edu.model.DemoModel Maven / Gradle / Ivy

There is a newer version: 2.3.1
Show newest version
package com.encoway.edu.model;

import java.io.Serializable;

/**
 * A simple model.
 * 
 * @param  value type
 */
public class DemoModel implements Serializable {

    /**
     * @since 1.5.7
     */
    private static final long serialVersionUID = 1659999273691357169L;

    private String name;

    private V initialValue;

    private V value;

    /**
     * Initializes a {@link DemoModel}.
     * 
     * @param name the name
     * @param value the value
     */
    public DemoModel(String name, V value) {
        this.name = name;
        this.value = this.initialValue = value;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public V getValue() {
        return value;
    }

    public void setValue(V value) {
        this.value = value;
    }

    /**
     * Resets the value to the initial value.
     */
    public void reset() {
        setValue(initialValue);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy