Class AbstractTokenEncoder

    • Constructor Detail

      • AbstractTokenEncoder

        protected AbstractTokenEncoder()
        Initializes a new encoder.
    • Method Detail

      • encodeField

        public void encodeField​(BinaryBuilder buffer,
                                int index)
        This implementation delegates to TokenEncoder.encode(BinaryBuilder). Implementations that require field-specific handling should override this method instead.
        Specified by:
        encodeField in interface TokenEncoder
        Parameters:
        buffer - the buffer to which to append the encoding
        index - the index of the field to encode
      • getSource

        protected final TokenValued getSource()
        Returns the current source held by this encoder.
        Returns:
        the current source held by this encoder.
      • doSourceUpdated

        protected abstract void doSourceUpdated​(TokenValued source)
        Sets the source buffer for encoding. Invoked when the source is initially set or updated.
        Parameters:
        source - the buffer from which values to encode are read