Interface K2DElementFactory

All Superinterfaces:
Serializable
All Known Implementing Classes:
AbstractK2DElementFactory, DefaultK2DElementFactory, K2DPointFactory

public interface K2DElementFactory extends Serializable
Classes that implement the K2DElementFactory interface are used to create K2DElement instances based using specified parameters.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final long
     
  • Method Summary

    Modifier and Type
    Method
    Description
    createElement(Geometry geometry, Object[] attributes, long id, int elementType)
    Creates a new instance of K2DElement based on the specified element type.
    int
    getDefaultType(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

  • 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.