Class StrongInternPool.Index

  • Enclosing class:
    StrongInternPool<E>

    public class StrongInternPool.Index
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int modCount  
      private int[] offsets  
    • Constructor Summary

      Constructors 
      Constructor Description
      Index()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int positionOf​(E e)
      Returns a 1-based position of given entry in the table.
      • Methods inherited from class java.lang.Object

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

      • offsets

        private int[] offsets
      • modCount

        private int modCount
    • Constructor Detail

      • Index

        Index()
    • Method Detail

      • positionOf

        public int positionOf​(E e)
        Returns a 1-based position of given entry in the table. Returns -1 if the entry is not present in the table. This indeed means that this method never returns 0.
        Parameters:
        e - the entry to find in the table
        Returns:
        1-based position of e in the table, or -1 if it is not present