code: public int previousSetBit(int from) {
          if(from < 0 || from >= size)
              throw new IndexOutOfBoundsException("index: " + from);
  
          int u = wordIndex(from);
  
          long word = words[u] & (WORD_MASK >>> -(from+1));
  
          while (true) {
              if (word != 0)
                  return (u+1) * BITS_PER_WORD - 1 - Long.numberOfLeadingZeros(word);
              if (u-- == 0)
                  return -1;
              word = words[u];
          }
      }
docs: Returns the index of the nearest bit that is set to {@code true}
  that occurs on or before the specified starting index.
  If no such bit exists, or if {@code -1} is given as the
  starting index, then {@code -1} is returned.
  @param  from the index to start checking from (inclusive)
  @return the index of the previous set bit, or {@code -1} if there is no such bit
  @throws IndexOutOfBoundsException if the specified index is less than {@code -1}