deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

org.deegree.geometry.standard.multi
Class DefaultMultiGeometry<T extends Geometry>

java.lang.Object
  extended by org.deegree.geometry.standard.AbstractDefaultGeometry
      extended by org.deegree.geometry.standard.multi.DefaultMultiGeometry<T>
Type Parameters:
T - type of contained geometry objects
All Implemented Interfaces:
Iterable<T>, Collection<T>, List<T>, Geometry, MultiGeometry<T>, GMLObject
Direct Known Subclasses:
DefaultMultiCurve, DefaultMultiLineString, DefaultMultiPoint, DefaultMultiPolygon, DefaultMultiSolid, DefaultMultiSurface

public class DefaultMultiGeometry<T extends Geometry>
extends AbstractDefaultGeometry
implements MultiGeometry<T>

Default implementation of MultiGeometry.

Version:
$Revision:$, $Date:$
Author:
Markus Schneider , last edited by: $Author:$

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.deegree.geometry.multi.MultiGeometry
MultiGeometry.MultiGeometryType
 
Nested classes/interfaces inherited from interface org.deegree.geometry.Geometry
Geometry.GeometryType
 
Field Summary
protected  List<T> members
           
 
Fields inherited from class org.deegree.geometry.standard.AbstractDefaultGeometry
crs, id, jtsFactory, jtsGeometry, pm
 
Constructor Summary
DefaultMultiGeometry(String id, CRS crs, PrecisionModel pm, List<T> members)
          Creates a new DefaultMultiGeometry from the given parameters.
 
Method Summary
 void add(int index, T element)
           
 boolean add(T e)
           
 boolean addAll(Collection<? extends T> c)
           
 boolean addAll(int index, Collection<? extends T> c)
           
protected  com.vividsolutions.jts.geom.GeometryCollection buildJTSGeometry()
           
 void clear()
           
 boolean contains(Object o)
           
 boolean containsAll(Collection<?> c)
           
 T get(int index)
           
 int getCoordinateDimension()
          Returns the coordinate dimension, i.e. the dimension of the space that the geometry is embedded in.
 Envelope getEnvelope()
          Returns the minimal bounding box of the geometry.
 Geometry.GeometryType getGeometryType()
          Must always return Geometry.GeometryType#MULTI_GEOMETRY.
 MultiGeometry.MultiGeometryType getMultiGeometryType()
           
 int indexOf(Object o)
           
 boolean isEmpty()
           
 Iterator<T> iterator()
           
 int lastIndexOf(Object o)
           
 ListIterator<T> listIterator()
           
 ListIterator<T> listIterator(int index)
           
 T remove(int index)
           
 boolean remove(Object o)
           
 boolean removeAll(Collection<?> c)
           
 boolean retainAll(Collection<?> c)
           
 T set(int index, T element)
           
 int size()
           
 List<T> subList(int fromIndex, int toIndex)
           
 Object[] toArray()
           
<T> T[]
toArray(T[] a)
           
 
Methods inherited from class org.deegree.geometry.standard.AbstractDefaultGeometry
contains, createFromJTS, crosses, equals, getAsDefaultGeometry, getBuffer, getCentroid, getConvexHull, getCoordinateSystem, getDifference, getDistance, getGMLProperties, getId, getIntersection, getJTSGeometry, getPrecision, getUnion, intersects, isBeyond, isDisjoint, isWithin, isWithinDistance, overlaps, setCoordinateSystem, setGMLProperties, setId, setPrecision, toString, touches
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.deegree.geometry.Geometry
contains, crosses, equals, getBuffer, getCentroid, getConvexHull, getCoordinateSystem, getDifference, getDistance, getId, getIntersection, getPrecision, getUnion, intersects, isBeyond, isDisjoint, isWithin, isWithinDistance, overlaps, setCoordinateSystem, setGMLProperties, setId, setPrecision, touches
 
Methods inherited from interface org.deegree.gml.GMLObject
getGMLProperties
 
Methods inherited from interface java.util.List
equals, hashCode
 

Field Detail

members

protected List<T extends Geometry> members
Constructor Detail

DefaultMultiGeometry

public DefaultMultiGeometry(String id,
                            CRS crs,
                            PrecisionModel pm,
                            List<T> members)
Creates a new DefaultMultiGeometry from the given parameters.

Parameters:
id - identifier, may be null
crs - coordinate reference system, may be null
pm - precision model, may be null
members -
Method Detail

getCoordinateDimension

public int getCoordinateDimension()
Description copied from interface: Geometry
Returns the coordinate dimension, i.e. the dimension of the space that the geometry is embedded in.

Specified by:
getCoordinateDimension in interface Geometry
Returns:
the coordinate dimension

getGeometryType

public Geometry.GeometryType getGeometryType()
Description copied from interface: MultiGeometry
Must always return Geometry.GeometryType#MULTI_GEOMETRY.

Specified by:
getGeometryType in interface Geometry
Specified by:
getGeometryType in interface MultiGeometry<T extends Geometry>
Returns:
Geometry.GeometryType#MULTI_GEOMETRY.

buildJTSGeometry

protected com.vividsolutions.jts.geom.GeometryCollection buildJTSGeometry()
Overrides:
buildJTSGeometry in class AbstractDefaultGeometry

add

public void add(int index,
                T element)
Specified by:
add in interface List<T extends Geometry>

add

public boolean add(T e)
Specified by:
add in interface Collection<T extends Geometry>
Specified by:
add in interface List<T extends Geometry>

addAll

public boolean addAll(Collection<? extends T> c)
Specified by:
addAll in interface Collection<T extends Geometry>
Specified by:
addAll in interface List<T extends Geometry>

addAll

public boolean addAll(int index,
                      Collection<? extends T> c)
Specified by:
addAll in interface List<T extends Geometry>

clear

public void clear()
Specified by:
clear in interface Collection<T extends Geometry>
Specified by:
clear in interface List<T extends Geometry>

contains

public boolean contains(Object o)
Specified by:
contains in interface Collection<T extends Geometry>
Specified by:
contains in interface List<T extends Geometry>

containsAll

public boolean containsAll(Collection<?> c)
Specified by:
containsAll in interface Collection<T extends Geometry>
Specified by:
containsAll in interface List<T extends Geometry>

get

public T get(int index)
Specified by:
get in interface List<T extends Geometry>

indexOf

public int indexOf(Object o)
Specified by:
indexOf in interface List<T extends Geometry>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Collection<T extends Geometry>
Specified by:
isEmpty in interface List<T extends Geometry>

iterator

public Iterator<T> iterator()
Specified by:
iterator in interface Iterable<T extends Geometry>
Specified by:
iterator in interface Collection<T extends Geometry>
Specified by:
iterator in interface List<T extends Geometry>

lastIndexOf

public int lastIndexOf(Object o)
Specified by:
lastIndexOf in interface List<T extends Geometry>

listIterator

public ListIterator<T> listIterator()
Specified by:
listIterator in interface List<T extends Geometry>

listIterator

public ListIterator<T> listIterator(int index)
Specified by:
listIterator in interface List<T extends Geometry>

remove

public T remove(int index)
Specified by:
remove in interface List<T extends Geometry>

remove

public boolean remove(Object o)
Specified by:
remove in interface Collection<T extends Geometry>
Specified by:
remove in interface List<T extends Geometry>

removeAll

public boolean removeAll(Collection<?> c)
Specified by:
removeAll in interface Collection<T extends Geometry>
Specified by:
removeAll in interface List<T extends Geometry>

retainAll

public boolean retainAll(Collection<?> c)
Specified by:
retainAll in interface Collection<T extends Geometry>
Specified by:
retainAll in interface List<T extends Geometry>

set

public T set(int index,
             T element)
Specified by:
set in interface List<T extends Geometry>

size

public int size()
Specified by:
size in interface Collection<T extends Geometry>
Specified by:
size in interface List<T extends Geometry>

subList

public List<T> subList(int fromIndex,
                       int toIndex)
Specified by:
subList in interface List<T extends Geometry>

toArray

public Object[] toArray()
Specified by:
toArray in interface Collection<T extends Geometry>
Specified by:
toArray in interface List<T extends Geometry>

toArray

public <T> T[] toArray(T[] a)
Specified by:
toArray in interface Collection<T extends Geometry>
Specified by:
toArray in interface List<T extends Geometry>

getEnvelope

public Envelope getEnvelope()
Description copied from interface: Geometry
Returns the minimal bounding box of the geometry.

Specified by:
getEnvelope in interface Geometry
Overrides:
getEnvelope in class AbstractDefaultGeometry
Returns:
the minimal bounding box of the geometry

getMultiGeometryType

public MultiGeometry.MultiGeometryType getMultiGeometryType()
Specified by:
getMultiGeometryType in interface MultiGeometry<T extends Geometry>
Returns:
the type of MultiGeometry, see MultiGeometry.MultiGeometryType

deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org

]]>