Class BytesTrie.Entry

  • Enclosing class:
    BytesTrie

    public static final class BytesTrie.Entry
    extends java.lang.Object
    Return value type for the Iterator.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private byte[] bytes  
      private int length  
      int value
      The value associated with the byte sequence.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Entry​(int capacity)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void append​(byte b)  
      private void append​(byte[] b, int off, int len)  
      byte byteAt​(int index)
      Returns a byte of the byte sequence.
      java.nio.ByteBuffer bytesAsByteBuffer()  
      int bytesLength()  
      void copyBytesTo​(byte[] dest, int destOffset)
      Copies the byte sequence into a byte array.
      private void ensureCapacity​(int len)  
      private void truncateString​(int newLength)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • value

        public int value
        The value associated with the byte sequence.
      • bytes

        private byte[] bytes
      • length

        private int length
    • Constructor Detail

      • Entry

        private Entry​(int capacity)
    • Method Detail

      • bytesLength

        public int bytesLength()
        Returns:
        The length of the byte sequence.
      • byteAt

        public byte byteAt​(int index)
        Returns a byte of the byte sequence.
        Parameters:
        index - An index into the byte sequence.
        Returns:
        The index-th byte sequence byte.
      • copyBytesTo

        public void copyBytesTo​(byte[] dest,
                                int destOffset)
        Copies the byte sequence into a byte array.
        Parameters:
        dest - Destination byte array.
        destOffset - Starting offset to where in dest the byte sequence is copied.
      • bytesAsByteBuffer

        public java.nio.ByteBuffer bytesAsByteBuffer()
        Returns:
        The byte sequence as a read-only ByteBuffer.
      • ensureCapacity

        private void ensureCapacity​(int len)
      • append

        private void append​(byte b)
      • append

        private void append​(byte[] b,
                            int off,
                            int len)
      • truncateString

        private void truncateString​(int newLength)