Class Index

  • All Implemented Interfaces:
    java.lang.Iterable<byte[]>

    public class Index
    extends java.lang.Object
    implements java.lang.Iterable<byte[]>
      0 -> 0, 122 -> 1 123 -> 123, 244 -> 2 245 -> 245, ...
     
    • Field Summary

      Fields 
      Modifier and Type Field Description
      aQute.lib.index.Index.Page root  
    • Constructor Summary

      Constructors 
      Constructor Description
      Index​(java.io.File file, int keySize)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      void insert​(byte[] k, long v)  
      java.util.Iterator<byte[]> iterator()  
      long search​(byte[] k)  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Field Detail

      • root

        public aQute.lib.index.Index.Page root
    • Constructor Detail

      • Index

        public Index​(java.io.File file,
                     int keySize)
              throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • insert

        public void insert​(byte[] k,
                           long v)
                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • search

        public long search​(byte[] k)
                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • close

        public void close()
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • iterator

        public java.util.Iterator<byte[]> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<byte[]>