// Path: src/main/java/com/github/eostermueller/heapspank/garbagespank/metricprovider/JStatMetricProvider.java
// public interface JStatMetricProvider {
// 	public static final String CALC_COLUMN_NOT_SUPPORTED = "<CalculatedColumnNotSupported>";	
// 	
// 	public int getIndexOfFirstEnhancedColumn();
// 	
// 	JVMVersion[] getSupportedVersions();
// 	String getDescription();
// 	String getOriginalHeader();
// 	String getEnhancedHeader();
// 	boolean metricsAvailableOnFirstJStatRun();
// 	JStatOption getJStatOption();
// 	String[] getJStatMetricNames();
// 	/**
//    	 * What does enhanced mean?
// 	 * Indexes for most columns point to data straight from jstat.
// 	 * Other columns, however, require some calculations.
// 	 * @param skipCalculatedColumns 
// 
// 	 * @param current
// 	 * @param previous
// 	 * @param mesasurementIntervalInSeconds
// 	 * @param i
// 	 * @return
// 	 */
// 	String getColumnEnhanced(boolean skipCalculatedColumns, JStatLine current, JStatLine previous, long mesasurementIntervalInMilliSeconds, int i);
// 
// 	String getColumnEnhancedAndFormatted(boolean skipCalculatedCol,
// 			JStatLine current, JStatLine previous,
// 			long measurementIntervalInMilliSeconds, int i);
// }


import java.util.Arrays;
import com.github.eostermueller.heapspank.garbagespank.metricprovider.JStatMetricProvider;
package com.github.eostermueller.heapspank.garbagespank;



/**
 * Reads in one row of this from $JAVA_HOME/bin/jstat
 * <PRE>
   S0     S1     E      O      M     CCS    YGC     YGCT    FGC    FGCT     GCT   
  0.00   0.00  63.97  86.27  98.13  96.64   4177   13.151    17    2.668   15.820
  </PRE>
  and parses the individual colums to be reformatted.
  
 * @author erikostermueller
 *
 */
public class JStatLine {
	private boolean skipCalculatedColumns;
	public void setSkipCalculatedColumns(boolean b) {
		this.skipCalculatedColumns = b;
	}
	public boolean getSkipCalculatedColumns() {
		return this.skipCalculatedColumns;
	}
	
	JStatLine previous = null;

	public JStatLine getPrevious() {
		return previous;
	}

	public void setPrevious(JStatLine previousLine) {
		this.previous = previousLine;
	}

	public String[] getRawColumnData() {
		return columnData;
	}

	public void setColumnData(String[] columnData) {
		this.columnData = columnData;
	}

	String[] columnData = null;
	String prefix = null;
// Path: src/main/java/com/github/eostermueller/heapspank/garbagespank/metricprovider/JStatMetricProvider.java
// public interface JStatMetricProvider {
// 	public static final String CALC_COLUMN_NOT_SUPPORTED = "<CalculatedColumnNotSupported>";	
// 	
// 	public int getIndexOfFirstEnhancedColumn();
// 	
// 	JVMVersion[] getSupportedVersions();
// 	String getDescription();
// 	String getOriginalHeader();
// 	String getEnhancedHeader();
// 	boolean metricsAvailableOnFirstJStatRun();
// 	JStatOption getJStatOption();
// 	String[] getJStatMetricNames();
// 	/**
//    	 * What does enhanced mean?
// 	 * Indexes for most columns point to data straight from jstat.
// 	 * Other columns, however, require some calculations.
// 	 * @param skipCalculatedColumns 
// 
// 	 * @param current
// 	 * @param previous
// 	 * @param mesasurementIntervalInSeconds
// 	 * @param i
// 	 * @return
// 	 */
// 	String getColumnEnhanced(boolean skipCalculatedColumns, JStatLine current, JStatLine previous, long mesasurementIntervalInMilliSeconds, int i);
// 
// 	String getColumnEnhancedAndFormatted(boolean skipCalculatedCol,
// 			JStatLine current, JStatLine previous,
// 			long measurementIntervalInMilliSeconds, int i);
// }


// Path: src/main/java/com/github/eostermueller/heapspank/garbagespank/JStatLine.java
import java.util.Arrays;
import com.github.eostermueller.heapspank.garbagespank.metricprovider.JStatMetricProvider;

package com.github.eostermueller.heapspank.garbagespank;



/**
 * Reads in one row of this from $JAVA_HOME/bin/jstat
 * <PRE>
   S0     S1     E      O      M     CCS    YGC     YGCT    FGC    FGCT     GCT   
  0.00   0.00  63.97  86.27  98.13  96.64   4177   13.151    17    2.668   15.820
  </PRE>
  and parses the individual colums to be reformatted.
  
 * @author erikostermueller
 *
 */
public class JStatLine {
	private boolean skipCalculatedColumns;
	public void setSkipCalculatedColumns(boolean b) {
		this.skipCalculatedColumns = b;
	}
	public boolean getSkipCalculatedColumns() {
		return this.skipCalculatedColumns;
	}
	
	JStatLine previous = null;

	public JStatLine getPrevious() {
		return previous;
	}

	public void setPrevious(JStatLine previousLine) {
		this.previous = previousLine;
	}

	public String[] getRawColumnData() {
		return columnData;
	}

	public void setColumnData(String[] columnData) {
		this.columnData = columnData;
	}

	String[] columnData = null;
	String prefix = null;
	JStatMetricProvider metricProvider = null;