Package org.goplanit.utils.od
Class OdDataImpl<T>
- java.lang.Object
-
- org.goplanit.utils.id.IdAbleImpl
-
- org.goplanit.utils.od.OdDataImpl<T>
-
- Type Parameters:
T
- the type of data to be stored for each origin-destination cell
- Direct Known Subclasses:
OdHashedImpl
,OdMatrixImpl
public abstract class OdDataImpl<T> extends IdAbleImpl implements OdData<T>
Base class containing common methods required by all classes which implement ODData- Author:
- gman6028
-
-
Constructor Summary
Constructors Constructor Description OdDataImpl(Class<? extends IdAble> idTokenClass, IdGroupingToken idToken, OdZones zones)
ConstructorOdDataImpl(OdDataImpl<T> other)
Copy Constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract OdDataImpl<T>
clone()
Create a shallow copy of this entityint
getNumberOfOdZones()
Returns the number of zones contained in the objectprotected OdZones
getOdZones()
Access to underlying zones-
Methods inherited from class org.goplanit.utils.id.IdAbleImpl
equals, generateAndSetId, generateId, getId, hashCode, setId
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.goplanit.utils.id.IdAble
compareTo, getId, idEquals, idHashCode
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
zones
protected OdZones zones
holder for zones considered in the matrix
-
-
Constructor Detail
-
OdDataImpl
public OdDataImpl(Class<? extends IdAble> idTokenClass, IdGroupingToken idToken, OdZones zones)
Constructor- Parameters:
idTokenClass
- to use for id groupingidToken
- to use for id generationzones
- zones considered in the matrix
-
OdDataImpl
public OdDataImpl(OdDataImpl<T> other)
Copy Constructor- Parameters:
other
- to copy
-
-
Method Detail
-
getOdZones
protected OdZones getOdZones()
Access to underlying zones- Returns:
- odZones
-
getNumberOfOdZones
public int getNumberOfOdZones()
Returns the number of zones contained in the object- Specified by:
getNumberOfOdZones
in interfaceOdData<T>
- Returns:
- number of zones in the object
-
clone
public abstract OdDataImpl<T> clone()
Create a shallow copy of this entity- Specified by:
clone
in interfaceIdAble
- Specified by:
clone
in classIdAbleImpl
- Returns:
- shallow copy of entity
-
-