Class DeferredProperty
java.lang.Object
org.apache.sis.internal.coverage.j2d.DeferredProperty
An image property for which the computation is differed.
This special kind of properties is recognized by the following methods:
- Since:
- 1.1
- Version:
- 1.1
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final classA deferred property for computing the value ofPlanarImage.GRID_GEOMETRY_KEY. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDeferredProperty(Function<RenderedImage, ?> provider) Creates a new deferred property. -
Method Summary
Modifier and TypeMethodDescription(package private) final Objectcompute(RenderedImage image) Returns the property value, which is computed when this method is first invoked.forGridGeometry(GridGeometry grid, int[] dimensions) Creates a deferred property for computing the value ofPlanarImage.GRID_GEOMETRY_KEY.
-
Field Details
-
value
The value, ornullif not yet computed. -
provider
The function computing the value. This function is reset tonullafter the value has been computed for allowing the garbage collector to do its work.
-
-
Constructor Details
-
DeferredProperty
Creates a new deferred property.- Parameters:
provider- function computing the value.
-
-
Method Details
-
compute
Returns the property value, which is computed when this method is first invoked.- Parameters:
image- the image for which to compute the property value.- Returns:
- the property value, or
nullif it cannot be computed.
-
forGridGeometry
Creates a deferred property for computing the value ofPlanarImage.GRID_GEOMETRY_KEY.- Parameters:
grid- the grid geometry of the grid coverage rendered as an image.dimensions- the dimensions to keep from the coverage grid geometry.- Returns:
- a deferred property for computing the grid geometry of an image.
-