Class MultiGeom

java.lang.Object
nz.org.riskscape.engine.types.MultiGeom
All Implemented Interfaces:
ContainingType, Type, WrappingType

public class MultiGeom extends Object implements WrappingType, ContainingType
  • Field Details

    • MULTI_LINE

      public static final MultiGeom MULTI_LINE
    • MULTI_POINT

      public static final MultiGeom MULTI_POINT
    • MULTI_POLYGON

      public static final MultiGeom MULTI_POLYGON
    • MULTI_LINE_TYPE_CONSTRUCTOR

      public static final SimpleTypeConstructor MULTI_LINE_TYPE_CONSTRUCTOR
    • MULTI_LINE_TYPE_INFORMATION

      public static final TypeInformation MULTI_LINE_TYPE_INFORMATION
    • MULTI_POINT_TYPE_CONSTRUCTOR

      public static final SimpleTypeConstructor MULTI_POINT_TYPE_CONSTRUCTOR
    • MULTI_POINT_TYPE_INFORMATION

      public static final TypeInformation MULTI_POINT_TYPE_INFORMATION
    • MULTI_POLYGON_TYPE_CONSTRUCTOR

      public static final SimpleTypeConstructor MULTI_POLYGON_TYPE_CONSTRUCTOR
    • MULTI_POLYGON_TYPE_INFORMATION

      public static final TypeInformation MULTI_POLYGON_TYPE_INFORMATION
  • Constructor Details

    • MultiGeom

      public MultiGeom(Class<? extends org.locationtech.jts.geom.GeometryCollection> internalType, Type containedType)
  • Method Details

    • coerce

      public Object coerce(Object value) throws CoercionException
      Description copied from interface: Type

      Attempt to convert the given value in to one represented by this type.

      Specified by:
      coerce in interface Type
      Parameters:
      value - The value to coerce
      Returns:
      A value that conforms to this type
      Throws:
      CoercionException - if the given object can not be converted to something represented by this type
    • internalType

      public Class<?> internalType()
      Description copied from interface: Type

      The underlying java class used to represent this type.

      Specified by:
      internalType in interface Type
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • isA

      public <T extends Type> boolean isA(Class<T> type)
      Specified by:
      isA in interface Type
    • visit

      public <T, U> U visit(TypeVisitor<T,U> tv, T data)
      Description copied from interface: Type

      Type specific visiting logic. Types must decide whether they are atomic or compound and call the relevant method on TypeVisitor. It's up to each compound type to decide how they want to structure their children, e.g. order, metadata, and what's considered a child or not.

      Specified by:
      visit in interface ContainingType
      Specified by:
      visit in interface Type
      Specified by:
      visit in interface WrappingType
    • getContainedType

      public Type getContainedType()
      Specified by:
      getContainedType in interface ContainingType
      Returns:
      The type that this ContainingType contains.
    • getUnderlyingType

      public Type getUnderlyingType()
      Specified by:
      getUnderlyingType in interface WrappingType
      Returns:
      the type that we immediately wrap. Used by Type.getUnwrappedType() to descend through all wrapped Type to find the first unwrapped one.