Package org.goplanit.utils.path
Interface DirectedPath
-
- All Superinterfaces:
Cloneable
,Comparable<IdAble>
,ExternalIdAble
,IdAble
,Iterable<EdgeSegment>
,ManagedId
- All Known Implementing Classes:
DirectedPathImpl
public interface DirectedPath extends ExternalIdAble, ManagedId, Iterable<EdgeSegment>
Path interface representing a path through the network on edge segment level- Author:
- markr
-
-
Field Summary
Fields Modifier and Type Field Description static Class<DirectedPath>
PATH_ID_CLASS
class to use for id generation
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description boolean
containsSubPath(Collection<? extends EdgeSegment> subPath)
Verify if the path contains the provided subpath.default Class<DirectedPath>
getIdClass()
Each managed id class is expected to generate its ids based on its class signature.default boolean
isEmpty()
verify if the size of the path is zero (empty) or notlong
size()
The size of the path is given by the number of edge segments it holds-
Methods inherited from interface org.goplanit.utils.id.ExternalIdAble
getExternalId, getXmlId, hasExternalId, hasXmlId, setExternalId, setXmlId
-
Methods inherited from interface org.goplanit.utils.id.IdAble
clone, compareTo, getId, idEquals, idHashCode
-
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Methods inherited from interface org.goplanit.utils.id.ManagedId
recreateManagedIds, resetChildManagedIdEntities
-
-
-
-
Field Detail
-
PATH_ID_CLASS
static final Class<DirectedPath> PATH_ID_CLASS
class to use for id generation
-
-
Method Detail
-
getIdClass
default Class<DirectedPath> 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
-
size
long size()
The size of the path is given by the number of edge segments it holds- Returns:
- size
-
isEmpty
default boolean isEmpty()
verify if the size of the path is zero (empty) or not- Returns:
- true when empty, false otherwise
-
containsSubPath
boolean containsSubPath(Collection<? extends EdgeSegment> subPath)
Verify if the path contains the provided subpath. It is only a subpath of the subpath is present continguously- Parameters:
subPath
- to verify- Returns:
- true when it contains the subpath, false otherwise.
-
-