Class ValidatingPofHandler.Complex

    • Constructor Detail

      • Complex

        public Complex​(ValidatingPofHandler.Complex complexCurrent,
                       int cElements,
                       boolean fContiguous)
        Construct a Complex object for a data collection or user type.
        Parameters:
        complexCurrent - the current Complex object or null
        cElements - the total (or maximum) number of elements
        fContiguous - true if the elements are contiguous
      • Complex

        public Complex​(ValidatingPofHandler.Complex complexCurrent,
                       int cElements,
                       boolean fContiguous,
                       int nUniformTypeId)
        Construct a Complex object for a uniformly-typed data collection.
        Parameters:
        complexCurrent - the current Complex object or null
        cElements - the total (or maximum) number of elements
        fContiguous - true if the elements are contiguous
        nUniformTypeId - the type identifier of the uniform type
    • Method Detail

      • checkPosition

        public void checkPosition​(int iPos)
        Notify the Complex object that a value has been encountered.
        Parameters:
        iPos - the position that accomponied the value
      • getLastPosition

        public int getLastPosition()
        Obtain the last known position, which is the index (or property number) of the most recent value.
        Returns:
        the previous position that was reported to checkPosition()
      • getNextPosition

        public int getNextPosition()
        For complex values with contiguous values, obtain the next position.
        Returns:
        the next position
      • getElementCount

        public int getElementCount()
        Obtain the total element count. The element count is not known (i.e. it is not limited) for user types. For sparse types, the element count is the maximum number of values in the sparse value, which is often greater than the actual number of values. For Map types, the number of values is two times the element count (since each element has a key and a value).
        Returns:
        the maximum element count
      • isContiguous

        public boolean isContiguous()
        Determine if the elements are contiguous.
        Returns:
        true for all complex types except user and sparse types
      • isUniform

        public boolean isUniform()
        Determine if the object encoding within the Complex type is uniform.
        Returns:
        true iff values within the Complex type are of a uniform type and are encoded uniformly
      • getUniformType

        public int getUniformType()
        If the object encoding is using uniform encoding, obtain the type id of the uniform type.
        Returns:
        the type id used for the uniform encoding
      • pop

        public ValidatingPofHandler.Complex pop()
        Pop this Complex object off the stack, returning the outer Complex object or null if there is none.
        Returns:
        the outer Complex object or null if there is none