Package org.goplanit.utils.zoning
Interface Centroid
-
- All Superinterfaces:
Comparable<IdAble>
,IdAble
,ManagedId
,Serializable
- All Known Implementing Classes:
CentroidImpl
public interface Centroid extends ManagedId, Serializable
A centroid is a singular spatial location in a zone that is deemed most representative if the zone's geometry were to be condensed into a single point- Author:
- markr
-
-
Field Summary
Fields Modifier and Type Field Description static Class<Centroid>
CENTROID_ID_CLASS
id class for generating ids
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Centroid
deepClone()
An id entity should always support a deep copy, i.e., all "owned" members will be deep copied when a clone of this instance is created via this call.default Class<? extends Centroid>
getIdClass()
Each managed id class is expected to generate its ids based on its class signature.String
getName()
The name of the centroidZone
getParentZone()
Return the parent zone of this centroidorg.locationtech.jts.geom.Point
getPosition()
Position of the centroiddefault boolean
hasName()
check if a name has been setdefault boolean
hasPosition()
Verify if position is available for centroidvoid
setName(String name)
Set the name of the centroidvoid
setParentZone(Zone parent)
Set the parent zone of this centroidvoid
setPosition(org.locationtech.jts.geom.Point position)
Set the Position of the centroidCentroid
shallowClone()
Create a shallow copy of this entity-
Methods inherited from interface org.goplanit.utils.id.IdAble
compareTo, getId, idEquals, idHashCode
-
Methods inherited from interface org.goplanit.utils.id.ManagedId
recreateManagedIds, resetChildManagedIdEntities
-
-
-
-
Method Detail
-
getIdClass
default Class<? extends Centroid> getIdClass()
Each managed id class is expected to generate its ids based on its class signature. To be able to generate the correct id the class used for id generation is to be provided via this method call.- Specified by:
getIdClass
in interfaceManagedId
- Returns:
- idClass to use for generating ids for instances of this idable derived class
-
setParentZone
void setParentZone(Zone parent)
Set the parent zone of this centroid- Parameters:
parent
- zone of this centroid
-
getParentZone
Zone getParentZone()
Return the parent zone of this centroid- Returns:
- parent zone of this centroid
-
getName
String getName()
The name of the centroid- Returns:
- its name
-
setName
void setName(String name)
Set the name of the centroid- Parameters:
name
- to use
-
hasName
default boolean hasName()
check if a name has been set- Returns:
- true when set, false otherwise
-
shallowClone
Centroid shallowClone()
Create a shallow copy of this entity- Specified by:
shallowClone
in interfaceIdAble
- Returns:
- shallow copy of entity
-
deepClone
Centroid deepClone()
An id entity should always support a deep copy, i.e., all "owned" members will be deep copied when a clone of this instance is created via this call. To be used with caution if not called by managed id container related code
-
getPosition
org.locationtech.jts.geom.Point getPosition()
Position of the centroid- Returns:
- the position
-
setPosition
void setPosition(org.locationtech.jts.geom.Point position)
Set the Position of the centroid- Parameters:
position
- to use
-
hasPosition
default boolean hasPosition()
Verify if position is available for centroid- Returns:
- true when available, false otherwise
-
-