docs: private Name getNameObject(List<? extends Name> list, double probability) {
          int index = Collections.binarySearch(list, new Name(null, probability), locateNameByCumulativeProbability);
          if (index >= 0) {
              return list.get(index);
          } else if (-index > list.size()) {
              throw new RuntimeException("Invalid probability provided - (" + probability +
                      "). Max allowed for this list is " + getMax(list));
          } else {
              return list.get((-index) - 1);
          }
      }