@Override
    public boolean add(S3StreamSetObject s3StreamSetObject) {
        // TODO: optimize by binary search
        for (int index = 0; index < this.list.size(); index++) {
            S3StreamSetObject current = this.list.get(index);
            if (s3StreamSetObject.compareTo(current) <= 0) {
                this.list.add(index, s3StreamSetObject);
                return true;
            }
        }
        this.list.add(s3StreamSetObject);
        return true;
    }
Construct a SortedStreamSetObjectsList from a list of S3StreamSetObjects.
@param list the list of S3StreamSetObjects, must guarantee that the list is sorted
metadata/src/main/java/org/apache/kafka/metadata/stream/SortedStreamSetObjectsList.java