Class OdMatrixImpl<T,​U>

    • Field Detail

      • matrixContents

        protected U matrixContents
        matrix of data values
    • Constructor Detail

      • OdMatrixImpl

        public OdMatrixImpl​(Class<? extends IdAble> idTokenClass,
                            IdGroupingToken idToken,
                            OdZones zones,
                            U matrixContents)
        Constructor for Od matrix containing primitives, i.e. number based
        Parameters:
        idTokenClass - to use for id generation
        idToken - to use for the matrix id
        zones - holder for zones considered in the matrix
        matrixContents - container for the matrix contents
      • OdMatrixImpl

        public OdMatrixImpl​(OdMatrixImpl<T,​U> other)
        Copy Constructor (shallow copy of matrix contents)
        Parameters:
        other - to copy
    • Method Detail

      • iterator

        public abstract OdMatrixIterator<T,​U> iterator()
        Returns an iterator which can iterate through all the origin-destination cells in the matrix
        Specified by:
        iterator in interface Iterable<T>
        Specified by:
        iterator in interface OdData<T>
        Specified by:
        iterator in interface OdMatrix<T,​U>
        Returns:
        iterator through all the origin-destination cells
      • clone

        public abstract OdMatrixImpl<T,​U> clone()
        Create a shallow copy of this entity
        Specified by:
        clone in interface IdAble
        Specified by:
        clone in class OdDataImpl<T>
        Returns:
        shallow copy of entity