/*
 * StatEntry.java
 *
 * Created on April 30, 2008, 6:35 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package sidnet.utilityviews.statscollector;

import sidnet.core.misc.Node;

/**
 *
 * @author Oliver
 */
public abstract class StatEntry
{
    protected String header = "Not Specified. Please Specify one in your StatEntry extending class";
    
    /**
     * Must be called from extending classes
     * Each data value that is being collected is refered to by means of a Header (or tag) (e.q. NumberOfNodesDead, AverageEnergy, etc)
     * @param header
     */
    public StatEntry(String header)
    {
        this.header = header;
    }
    
    /** 
     * Each data value that is being collected is refered to by means of a Header (or tag) (e.q. NumberOfNodesDead, AverageEnergy, etc)
     * @return header
     */
    public String getHeader()
    {
        return header;
    }
    
    /**
     * Returns the current recorded value of the data that is being monitored, as String
     * @return data value
     */
    public String getValueAsString()
    {
        return "N/A";
    }
    
    /**
     * User-defined processing (update of inner statistical values) based on the informations comprised in the Node
     */
   public void update(Node[] nodes)
   {
       // USER DEFINED
   }
}
