Class WritingPofHandler.ComplexMap

  • Enclosing class:
    WritingPofHandler

    public static class WritingPofHandler.ComplexMap
    extends WritingPofHandler.Complex
    A ComplexMap object represents a map data structure (with uniform keys or with uniform keys and values) in the POF stream.
    • Constructor Detail

      • ComplexMap

        public ComplexMap​(WritingPofHandler.Complex complexCurrent,
                          int nUniformKeyTypeId)
        Construct a ComplexMap object for maps with uniformly-typed keys.
        Parameters:
        complexCurrent - the current Complex object or null
        nUniformKeyTypeId - the type identifier of the uniform type
      • ComplexMap

        public ComplexMap​(WritingPofHandler.Complex complexCurrent,
                          int nUniformKeyTypeId,
                          int nUniformValTypeId)
        Construct a ComplexMap object for maps with uniformly-typed keys and values.
        Parameters:
        complexCurrent - the current Complex object or null
        nUniformKeyTypeId - the type identifier of the uniform type for keys in the map
        nUniformValTypeId - the type identifier of the uniform type for values in the map
    • Method Detail

      • onValue

        public void onValue​(int iPos)
        Notify the Complex object that a value has been encountered.
        Overrides:
        onValue in class WritingPofHandler.Complex
        Parameters:
        iPos - the position that accomponied the value
      • isUniform

        public boolean isUniform()
        Determine if the object encoding within the Complex type is uniform.
        Overrides:
        isUniform in class WritingPofHandler.Complex
        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.
        Overrides:
        getUniformType in class WritingPofHandler.Complex
        Returns:
        the type id used for the uniform encoding