Package org.meteoinfo.jts.geom.util
Class GeometryExtracter
- java.lang.Object
-
- org.meteoinfo.jts.geom.util.GeometryExtracter
-
- All Implemented Interfaces:
GeometryFilter
public class GeometryExtracter extends java.lang.Object implements GeometryFilter
Extracts the components of a given type from aGeometry.
-
-
Constructor Summary
Constructors Constructor Description GeometryExtracter(java.lang.Class clz, java.util.List comps)Constructs a filter with a list in which to store the elements found.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.util.Listextract(Geometry geom, java.lang.Class clz)Extracts the components of type clz from aGeometryand returns them in aList.static java.util.Listextract(Geometry geom, java.lang.Class clz, java.util.List list)Extracts the components of type clz from aGeometryand adds them to the providedList.voidfilter(Geometry geom)Performs an operation with or ongeom.protected static booleanisOfClass(java.lang.Object o, java.lang.Class clz)
-
-
-
Method Detail
-
isOfClass
protected static boolean isOfClass(java.lang.Object o, java.lang.Class clz)
-
extract
public static java.util.List extract(Geometry geom, java.lang.Class clz, java.util.List list)
Extracts the components of type clz from aGeometryand adds them to the providedList.- Parameters:
geom- the geometry from which to extractlist- the list to add the extracted elements to
-
extract
public static java.util.List extract(Geometry geom, java.lang.Class clz)
Extracts the components of type clz from aGeometryand returns them in aList.- Parameters:
geom- the geometry from which to extract
-
filter
public void filter(Geometry geom)
Description copied from interface:GeometryFilterPerforms an operation with or ongeom.- Specified by:
filterin interfaceGeometryFilter- Parameters:
geom- aGeometryto which the filter is applied.
-
-