Package org.goplanit.utils.graph
Interface UntypedGraph<V extends Vertex,E extends Edge>
-
- All Superinterfaces:
Comparable<IdAble>
,IdAble
,ManagedId
- All Known Subinterfaces:
DirectedGraph<V,E,ES>
,Graph<V,E>
,UntypedDirectedGraph<V,E,ES>
- All Known Implementing Classes:
ConjugateDirectedGraphImpl
,ConjugateGraphImpl
,DirectedGraphImpl
,GraphImpl
,UntypedDirectedGraphImpl
,UntypedGraphImpl
public interface UntypedGraph<V extends Vertex,E extends Edge> extends ManagedId
A graph interface consisting of vertices and edges without specifying a concrete container type to access them. Only generic method signatures in this base interface.- Author:
- markr
-
-
Field Summary
Fields Modifier and Type Field Description static Class<UntypedGraph>
GRAPH_ID_CLASS
id class for generating ids
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description UntypedGraph<V,E>
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.GraphEntities<E>
getEdges()
collect edges of graphGraphEntities<V>
getVertices()
collect vertices of graphdefault boolean
isEmpty()
Verify if empty, empty when no nodes and edges existUntypedGraph<V,E>
shallowClone()
Create a shallow copy of this entitydefault void
transformGeometries(org.opengis.referencing.operation.MathTransform transformer)
transform all geometries of the nodes and edges using the same transformer, can be used to transform from one coordinate reference system to another, or perform translations, etc.default boolean
validate()
validate the graph, issues will be logged-
Methods inherited from interface org.goplanit.utils.id.IdAble
compareTo, getId, idEquals, idHashCode
-
Methods inherited from interface org.goplanit.utils.id.ManagedId
getIdClass, recreateManagedIds, resetChildManagedIdEntities
-
-
-
-
Field Detail
-
GRAPH_ID_CLASS
static final Class<UntypedGraph> GRAPH_ID_CLASS
id class for generating ids
-
-
Method Detail
-
getVertices
GraphEntities<V> getVertices()
collect vertices of graph- Returns:
- vertices
-
getEdges
GraphEntities<E> getEdges()
collect edges of graph- Returns:
- edges
-
isEmpty
default boolean isEmpty()
Verify if empty, empty when no nodes and edges exist- Returns:
- true when no nodes and edges, false otherwise
-
validate
default boolean validate()
validate the graph, issues will be logged- Returns:
- true when valid, false otherwise
-
transformGeometries
default void transformGeometries(org.opengis.referencing.operation.MathTransform transformer) throws org.opengis.geometry.MismatchedDimensionException, org.opengis.referencing.operation.TransformException
transform all geometries of the nodes and edges using the same transformer, can be used to transform from one coordinate reference system to another, or perform translations, etc.- Parameters:
transformer
- to apply- Throws:
org.opengis.geometry.MismatchedDimensionException
- thrown if errororg.opengis.referencing.operation.TransformException
- thrown if error
-
shallowClone
UntypedGraph<V,E> shallowClone()
Create a shallow copy of this entity- Specified by:
shallowClone
in interfaceIdAble
- Returns:
- shallow copy of entity
-
deepClone
UntypedGraph<V,E> 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
-
-