org.geotools.feature.visitor
Class BoundsVisitor.BoundsResult

Object
  extended by AbstractCalcResult
      extended by BoundsVisitor.BoundsResult
All Implemented Interfaces:
CalcResult
Enclosing class:
BoundsVisitor

public static class BoundsVisitor.BoundsResult
extends AbstractCalcResult


Constructor Summary
BoundsVisitor.BoundsResult(ReferencedEnvelope bbox)
           
 
Method Summary
 ReferencedEnvelope 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.
 
Methods inherited from class AbstractCalcResult
toArray, toDouble, toEnvelope, toFloat, toGeometry, toInt, toList, toLong, toMap, toPoint, toSet, toString, toStringArray
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BoundsVisitor.BoundsResult

public BoundsVisitor.BoundsResult(ReferencedEnvelope bbox)
Method Detail

getValue

public ReferencedEnvelope getValue()
Description copied from interface: CalcResult
Actual answer

Specified by:
getValue in interface CalcResult
Overrides:
getValue in class AbstractCalcResult
Returns:
the calculation result as a generic object

isCompatible

public boolean isCompatible(CalcResult targetResults)
Description copied from interface: CalcResult
Returns true if the target results is a compatible type with the current results, with compatible meaning that the two results may be merged.

Specified by:
isCompatible in interface CalcResult
Overrides:
isCompatible in class AbstractCalcResult
Parameters:
targetResults - the second CalcResult Object
Returns:
true if the targetResults can be merged with the current results

merge

public CalcResult merge(CalcResult resultsToAdd)
Description copied from interface: CalcResult
Returns the merged results of two CalcResult. The way in which the results are merged is dependent on the type of the results added. A new instance is created containing the merged results.

For example: merging two min functions would return the smaller of the two values; merging a count and a sum would return an average.

Specified by:
merge in interface CalcResult
Overrides:
merge in class AbstractCalcResult
Returns:
the merged results


Copyright © 1996-2010 Geotools. All Rights Reserved.