/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.dhaval.appstats.model;

import java.io.Serializable;

/**
 *
 * @author dhaval
 */
public class Process implements Serializable{

    private String name;
    private String label;
    private boolean running;

    public Process(String name, String label, boolean running) {
        this.name = name;
        this.label = label;
        this.running = running;
    }

    public Process() {
    }

    
    public String getLabel() {
        return label;
    }

    public String getName() {
        return name;
    }

    public boolean isRunning() {
        return running;
    }

    @Override
    public boolean equals(Object o) {
        Process proc = (Process) o;
        return proc.name.equalsIgnoreCase(name);
    }

    @Override
    public int hashCode() {
        return name.hashCode();
    }

    @Override
    public String toString() {
        return "process: {name: "+ name + ", label: " + label + ", running: "+ running+"}";
    }


}
