synchronized boolean evict(final PeerId peer) {
    // If the bucket is empty, there's nothing to evict.
    if (tailIndex < 0) {
      return false;
    }
    // If found, shift all subsequent elements to the left, and decrement tailIndex.
    for (int i = 0; i <= tailIndex; i++) {
      // Peer comparison here must be done by peer id
      if (peer.getId().equals(kBucket[i].getId())) {
        arraycopy(kBucket, i + 1, kBucket, i, tailIndex - i);
        kBucket[tailIndex--] = null;
        return true;
      }
    }
    return false;
  }
Removes the element at the specified position in this list. Shifts any subsequent elements to
the left (subtracts one from their indices).

@param peer the element to be removed
@return <code>true</code>
ethereum/p2p/src/main/java/org/hyperledger/besu/ethereum/p2p/discovery/internal/Bucket.java