Package org.goplanit.path
Class OdPathSets
- java.lang.Object
-
- org.goplanit.component.PlanitComponent<OdPathSets>
-
- org.goplanit.path.OdPathSets
-
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<IdAble>,EventListener,PlanitComponentListener,EventListener,ExternalIdAble,IdAble
public class OdPathSets extends PlanitComponent<OdPathSets> implements Serializable
Contains one or more origin-destination based path sets that can be used in assignment. For now each individual path set takes on the form of the already available ODPathMatrix. In future versions more flexible implementation are planned- Author:
- markr
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected TreeMap<Long,OdPathMatrix>odPathMatricesmap holding all registered od path matrices by their unique id
-
Constructor Summary
Constructors Constructor Description OdPathSets(OdPathSets other)ConstructorOdPathSets(IdGroupingToken groupId)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OdPathSetsclone()Create a shallow copy of this entityOdPathMatrixcreateAndRegisterOdPathMatrix(Zoning zoning)Create an empty od path matrix and register it on this od path setsOdPathMatrixgetFirstOdPathMatrix()Collect the first od path matrix availableintgetNumberOfOdPathSets()Collect the number of registered od path setsBooleanhasRegisteredOdMatrices()verify if any od path matrices have been registered or notvoidregisterOdPathMatrix(OdPathMatrix odPathMatrix)register the passed in path matrix (not copied)voidreset()remove all registered path sets.-
Methods inherited from class org.goplanit.component.PlanitComponent
equals, getComponentType, getExternalId, getId, getIdGroupingToken, getKnownSupportedEventTypes, getXmlId, hashCode, onPlanitComponentEvent, setExternalId, setXmlId
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.goplanit.utils.event.EventListener
hasKnownSupportedEventTypes
-
Methods inherited from interface org.goplanit.utils.id.ExternalIdAble
hasExternalId, hasXmlId
-
Methods inherited from interface org.goplanit.utils.id.IdAble
compareTo, idEquals, idHashCode
-
-
-
-
Field Detail
-
odPathMatrices
protected final TreeMap<Long,OdPathMatrix> odPathMatrices
map holding all registered od path matrices by their unique id
-
-
Constructor Detail
-
OdPathSets
public OdPathSets(IdGroupingToken groupId)
Constructor- Parameters:
groupId- contiguous id generation within this group for instances of this class
-
OdPathSets
public OdPathSets(OdPathSets other)
Constructor- Parameters:
other- to copy
-
-
Method Detail
-
getNumberOfOdPathSets
public int getNumberOfOdPathSets()
Collect the number of registered od path sets- Returns:
- number of od path sets
-
createAndRegisterOdPathMatrix
public OdPathMatrix createAndRegisterOdPathMatrix(Zoning zoning)
Create an empty od path matrix and register it on this od path sets- Parameters:
zoning- used to derive the size of the aquare zone based matrix- Returns:
- newly created od path matrix
-
registerOdPathMatrix
public void registerOdPathMatrix(OdPathMatrix odPathMatrix)
register the passed in path matrix (not copied)- Parameters:
odPathMatrix- to register
-
hasRegisteredOdMatrices
public Boolean hasRegisteredOdMatrices()
verify if any od path matrices have been registered or not- Returns:
- true if any are registered, false otherwise
-
getFirstOdPathMatrix
public OdPathMatrix getFirstOdPathMatrix()
Collect the first od path matrix available- Returns:
- the first od path matrix available, if not available null is returned
-
clone
public OdPathSets clone()
Create a shallow copy of this entity- Specified by:
clonein interfaceIdAble- Specified by:
clonein classPlanitComponent<OdPathSets>- Returns:
- shallow copy of entity
-
reset
public void reset()
remove all registered path sets. Note that this does not reset the path ids since this component does not own or represents the managed paths container- Specified by:
resetin classPlanitComponent<OdPathSets>
-
-