Interface K2DElementFactory
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
AbstractK2DElementFactory,DefaultK2DElementFactory,K2DPointFactory
Classes that implement the K2DElementFactory interface are used to create K2DElement
instances based using specified parameters.
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioncreateElement(Geometry geometry, Object[] attributes, long id, int elementType) Creates a new instance of K2DElement based on the specified element type.intgetDefaultType(int geometryType) Returns the element type that this element factory will create for the specified geometry type.int[]getSupportedTypes(int geometryType) Returns all element types that this element factory can create for the specified geometry type.
-
Field Details
-
serialVersionUID
static final long serialVersionUID- See Also:
-
-
Method Details
-
createElement
K2DElement createElement(Geometry geometry, Object[] attributes, long id, int elementType) throws IllegalArgumentException Creates a new instance of K2DElement based on the specified element type. That new element will be initialized will use the specified id, geometry and attributes.- Parameters:
geometry- the element geoemtry.attributes- element attributes.id- the element unique id.elementType- the element type to create.- Returns:
- a newly created K2DElement.
- Throws:
IllegalArgumentException
-
getSupportedTypes
int[] getSupportedTypes(int geometryType) Returns all element types that this element factory can create for the specified geometry type.- Parameters:
geometryType- a geometry type.- Returns:
- an array of element types.
-
getDefaultType
int getDefaultType(int geometryType) Returns the element type that this element factory will create for the specified geometry type.- Parameters:
geometryType- a geometry type.- Returns:
- the element type.
-