Class OdDataImpl<T>

  • Type Parameters:
    T - the type of data to be stored for each origin-destination cell
    All Implemented Interfaces:
    Comparable<IdAble>, Iterable<T>, IdAble, OdData<T>
    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
    • 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 grouping
        idToken - to use for id generation
        zones - 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 interface OdData<T>
        Returns:
        number of zones in the object
      • deepClone

        public abstract OdDataImpl<T> 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
        Specified by:
        deepClone in interface IdAble
        Specified by:
        deepClone in class IdAbleImpl
        Returns:
        deep copy of entity