Package pulse.tasks.processing
Class AbstractResult
- java.lang.Object
-
- pulse.util.UpwardsNavigable
-
- pulse.tasks.processing.AbstractResult
-
- All Implemented Interfaces:
Serializable,Descriptive
- Direct Known Subclasses:
AverageResult,Result
public abstract class AbstractResult extends UpwardsNavigable
AnAbstractResultis either an individual, independentResult, aResultthat forms a part of theAverageResult, or theAverageResult, which combines otherResults. It is specified by theResultFormatand a list ofNumericProperties.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractResult(AbstractResult r)AbstractResult(ResultFormat format)Constructs anAbstractResultwith the list of properties specified byformat.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddProperty(NumericProperty p)booleanequals(Object o)static List<NumericProperty>filterProperties(AbstractResult result)A static method for filtering the properties contained in theresultto choose only those that conform to itsformat.static List<NumericProperty>filterProperties(AbstractResult result, ResultFormat format)A static method for filtering the properties contained in theresultto choose only those that conform to theformat.ResultFormatgetFormat()List<NumericProperty>getProperties()Returns a list ofNumericProperties, which conform to the chosenResultFormatprotected NumericPropertygetProperty(int i)voidsetFormat(ResultFormat format)StringtoString()This will print out all the properties according to theResultFormat.-
Methods inherited from class pulse.util.UpwardsNavigable
addHierarchyListener, describe, getHierarchyListeners, getParent, identify, initListeners, removeHierarchyListener, removeHierarchyListeners, setParent, specificAncestor, tellParent
-
-
-
-
Constructor Detail
-
AbstractResult
public AbstractResult(ResultFormat format)
Constructs anAbstractResultwith the list of properties specified byformat.- Parameters:
format- aResultFormat
-
AbstractResult
public AbstractResult(AbstractResult r)
-
-
Method Detail
-
getFormat
public ResultFormat getFormat()
-
toString
public String toString()
This will print out all the properties according to theResultFormat.
-
getProperties
public List<NumericProperty> getProperties()
Returns a list ofNumericProperties, which conform to the chosenResultFormat- Returns:
- a list of relevant
NumericPropertyobjects
-
addProperty
protected void addProperty(NumericProperty p)
-
getProperty
protected NumericProperty getProperty(int i)
-
setFormat
public void setFormat(ResultFormat format)
-
filterProperties
public static List<NumericProperty> filterProperties(AbstractResult result, ResultFormat format)
A static method for filtering the properties contained in theresultto choose only those that conform to theformat.- Parameters:
result- anAbstractResultwith a list of propertiesformat- the format used for filtering- Returns:
- the filtered list of properties
-
filterProperties
public static List<NumericProperty> filterProperties(AbstractResult result)
A static method for filtering the properties contained in theresultto choose only those that conform to itsformat.- Parameters:
result- anAbstractResultwith a list of properties and a specified format- Returns:
- the filtered list of properties
-
-