|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hackystat.projectbrowser.page.projectportfolio.detailspanel.chart.StreamTrendClassifier
public class StreamTrendClassifier
Classify stream trend into 4 classes: increasing, decreasing, stable and unstable(other). Monotonous increase line will be considered as increasing. Monotonous decrease line will be considered as decreasing. Exactly flat horizontal line will be considered as stable. Others will be considered as unstable(other). Note: a flat line with a little difference in the middle will be consider as unstable(other).
Field Summary | |
---|---|
static java.lang.String |
name
Name of this classifier. |
Constructor Summary | |
---|---|
StreamTrendClassifier(double lowerThreshold,
double higherThreshold,
boolean higherBetter,
boolean scaleWithGranularity)
|
Method Summary | |
---|---|
org.apache.wicket.markup.html.panel.Panel |
getConfigurationPanel(java.lang.String id)
Return the panel for users to configure this stream trend classifer. |
double |
getHigherThreshold()
|
double |
getLowerThreshold()
|
java.lang.String |
getName()
|
PortfolioCategory |
getStreamCategory(MiniBarChart chart)
Parse the given MiniBarChart and produce a PortfolioCategory result. |
PortfolioCategory |
getValueCategory(double value)
Return the category of the given value. |
boolean |
isHigherBetter()
|
void |
saveSetting(Measures.Measure measure)
Save classifier's setting into the given Measures.Measure instance. |
void |
setHigherBetter(boolean higherBetter)
|
void |
setHigherThreshold(double higherThreshold)
|
void |
setLowerThreshold(double lowerThreshold)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String name
Constructor Detail |
---|
public StreamTrendClassifier(double lowerThreshold, double higherThreshold, boolean higherBetter, boolean scaleWithGranularity)
lowerThreshold
- the lowerThreshold
to set.higherThreshold
- the higherThreshold
to set.higherBetter
- the higherBetter
to set.scaleWithGranularity
- the scaleWithGranularity to set.Method Detail |
---|
public PortfolioCategory getStreamCategory(MiniBarChart chart)
getStreamCategory
in interface StreamClassifier
chart
- the input chart
public org.apache.wicket.markup.html.panel.Panel getConfigurationPanel(java.lang.String id)
getConfigurationPanel
in interface StreamClassifier
id
- The Wicket component id.
public PortfolioCategory getValueCategory(double value)
higherThreshold
, getHighCategory()
will be returned.
If value is higher than lowerThreshold
, getLowCategory()
will be returned.
Otherwise, will return AVERAGE.
getValueCategory
in interface StreamClassifier
value
- the given value.
PortfolioCategory
resultpublic void setHigherBetter(boolean higherBetter)
higherBetter
- the higherBetter to setpublic boolean isHigherBetter()
public void setHigherThreshold(double higherThreshold)
higherThreshold
- the higherThreshold to setpublic double getHigherThreshold()
public void setLowerThreshold(double lowerThreshold)
lowerThreshold
- the lowerThreshold to setpublic double getLowerThreshold()
public java.lang.String getName()
getName
in interface StreamClassifier
public void saveSetting(Measures.Measure measure)
Measures.Measure
instance.
saveSetting
in interface StreamClassifier
measure
- the given Measures.Measure
instance
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |