|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectAbstractCalcResult
public class AbstractCalcResult
An abstract implementation for CalcResults. Each subclass should implement its own getValue(), merge(), and constructor methods.
trunk/modules/library (gt-library.jar) (Maven report) (SVN head)| Constructor Summary | |
|---|---|
AbstractCalcResult()
|
|
| Method Summary | |
|---|---|
Object |
getValue()
Actual answer |
boolean |
isCompatible(CalcResult targetResults)
Returns true if the target results is a compatible type with the current results, with compatible meaning that the two results may be merged. |
CalcResult |
merge(CalcResult resultsToAdd)
Returns the merged results of two CalcResult. |
Object[] |
toArray()
Access getValue as an array |
double |
toDouble()
Access getValue as a double |
Envelope |
toEnvelope()
Access getValue as an envelope |
float |
toFloat()
Access getValue as a float |
Geometry |
toGeometry()
Access getValue as a geometry |
int |
toInt()
Access getValue as an int |
List |
toList()
Access getValue as a list |
long |
toLong()
Access getValue as a long |
Map |
toMap()
Access getValue as a map |
Point |
toPoint()
Access getValue as a point |
Set |
toSet()
Access getValue as a set |
String |
toString()
Access getValue as a string |
String[] |
toStringArray()
|
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractCalcResult()
| Method Detail |
|---|
public boolean isCompatible(CalcResult targetResults)
CalcResult
isCompatible in interface CalcResulttargetResults - the second CalcResult Object
public CalcResult merge(CalcResult resultsToAdd)
CalcResultFor example: merging two min functions would return the smaller of the two values; merging a count and a sum would return an average.
merge in interface CalcResultpublic Object getValue()
CalcResult
getValue in interface CalcResultpublic int toInt()
CalcResult
toInt in interface CalcResultpublic double toDouble()
CalcResult
toDouble in interface CalcResultpublic long toLong()
CalcResult
toLong in interface CalcResultpublic float toFloat()
CalcResult
toFloat in interface CalcResultpublic Geometry toGeometry()
CalcResult
toGeometry in interface CalcResultpublic Envelope toEnvelope()
CalcResult
toEnvelope in interface CalcResultpublic Point toPoint()
CalcResult
toPoint in interface CalcResultpublic Set toSet()
CalcResult
toSet in interface CalcResultpublic List toList()
CalcResult
toList in interface CalcResultpublic Object[] toArray()
CalcResult
toArray in interface CalcResultpublic String[] toStringArray()
public Map toMap()
CalcResult
toMap in interface CalcResultpublic String toString()
CalcResult
toString in interface CalcResulttoString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||