code: public boolean getCoilStatus(int index) throws IndexOutOfBoundsException {
  
          if (index < 0) {
              throw new IllegalArgumentException(index + " < 0");
          }
  
          if (index > coils.size()) {
              throw new IndexOutOfBoundsException(index + " > " + coils.size());
          }
  
          return coils.getBit(index);
      }
docs: Convenience method that returns the state
  of the bit at the given index.
  <p>
  
  @param index the index of the coil for which
  the status should be returned.
  
  @return true if set, false otherwise.
  
  @throws IndexOutOfBoundsException if the
  index is out of bounds