Class PolygonsObject

  • All Implemented Interfaces:
    SpatialComparable

    public class PolygonsObject
    extends java.lang.Object
    implements SpatialComparable
    Object representation consisting of (multiple) polygons.
    Since:
    0.4.0
    Author:
    Erich Schubert
    • Constructor Summary

      Constructors 
      Constructor Description
      PolygonsObject​(java.util.Collection<Polygon> polygons)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void appendToBuffer​(java.lang.StringBuilder buf)
      Append polygons to the buffer.
      int getDimensionality()
      Returns the dimensionality of the object.
      double getMax​(int dimension)
      Returns the maximum coordinate at the specified dimension.
      double getMin​(int dimension)
      Returns the minimum coordinate at the specified dimension.
      java.util.Collection<Polygon> getPolygons()
      Access the polygon data.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • PROTOTYPE

        public static final PolygonsObject PROTOTYPE
        Static (empty) prototype
      • polygons

        private java.util.Collection<Polygon> polygons
        The polygons
    • Constructor Detail

      • PolygonsObject

        public PolygonsObject​(java.util.Collection<Polygon> polygons)
        Constructor.
        Parameters:
        polygons - Polygons
    • Method Detail

      • getPolygons

        public java.util.Collection<Polygon> getPolygons()
        Access the polygon data.
        Returns:
        Polygon collection
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • appendToBuffer

        public void appendToBuffer​(java.lang.StringBuilder buf)
        Append polygons to the buffer.
        Parameters:
        buf - Buffer to append to
      • getMin

        public double getMin​(int dimension)
        Description copied from interface: SpatialComparable
        Returns the minimum coordinate at the specified dimension.
        Specified by:
        getMin in interface SpatialComparable
        Parameters:
        dimension - the dimension for which the coordinate should be returned, where 0 ≤ dimension < getDimensionality()
        Returns:
        the minimum coordinate at the specified dimension
      • getMax

        public double getMax​(int dimension)
        Description copied from interface: SpatialComparable
        Returns the maximum coordinate at the specified dimension.
        Specified by:
        getMax in interface SpatialComparable
        Parameters:
        dimension - the dimension for which the coordinate should be returned, where 0 ≤ dimension < getDimensionality()
        Returns:
        the maximum coordinate at the specified dimension