org.android.activityminer.model.evaluation
Class PerClassStatistic

Package class diagram package PerClassStatistic
java.lang.Object
  extended by org.android.activityminer.model.evaluation.PerClassStatistic
All Implemented Interfaces:
Parcelable, SerializableData

public final class PerClassStatistic
extends Object
implements SerializableData, Parcelable

The per class statistic does contain the metric values for a single class, created from the PerClassResult type.


Nested Class Summary
 
Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
 
Field Summary
private  long classId
          The class identifier.
static Parcelable.Creator<PerClassStatistic> CREATOR
          The Parcelable creator.
private  double[] measureValues
          The array with the ordered measure values.
 
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
 
Constructor Summary
PerClassStatistic(long classId, double[] measureValues)
          Constructor
PerClassStatistic(long classId, PerClassResult classResult)
          Constructor
PerClassStatistic(Parcel source)
          Constructor
 
Method Summary
 int describeContents()
           
 long getClassId()
          Getter for the class label
static String[] getMeasureDescriptions(Context context)
          Getter for the column header descriptions for formatted output.
 double[] getMeasureValues()
          Getter for the measure values
static double[] getValues(PerClassResult classResult)
          Does get the array of ordered measure values from a class result.
 String toXML()
           
 void writeToParcel(Parcel dest, int flags)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

classId

private final long classId
The class identifier.


measureValues

private final double[] measureValues
The array with the ordered measure values.


CREATOR

public static final Parcelable.Creator<PerClassStatistic> CREATOR
The Parcelable creator.

Constructor Detail

PerClassStatistic

public PerClassStatistic(long classId,
                         PerClassResult classResult)
Constructor

Parameters:
classId - the class identifier
classResult - the class result to create from

PerClassStatistic

public PerClassStatistic(long classId,
                         double[] measureValues)
Constructor

Parameters:
classId - the class identifier
measureValues - the measure values

PerClassStatistic

public PerClassStatistic(Parcel source)
Constructor

Parameters:
source - the parcel to create from
Method Detail

writeToParcel

public final void writeToParcel(Parcel dest,
                                int flags)
Specified by:
writeToParcel in interface Parcelable

getClassId

public final long getClassId()
Getter for the class label

Returns:
the class label

getMeasureValues

public final double[] getMeasureValues()
Getter for the measure values

Returns:
the measureme values

getMeasureDescriptions

public static final String[] getMeasureDescriptions(Context context)
Getter for the column header descriptions for formatted output.

Parameters:
context - the context
Returns:
the column header descriptions

getValues

public static final double[] getValues(PerClassResult classResult)
Does get the array of ordered measure values from a class result.

Parameters:
classResult - the class result
Returns:
the the array of ordered measure values

toXML

public final String toXML()
                   throws Exception
Specified by:
toXML in interface SerializableData
Throws:
Exception

describeContents

public final int describeContents()
Specified by:
describeContents in interface Parcelable