public static Object extractSingleValue(Collection<?> value) {
        if (value == null || value.size() != 1) {
            throw new IllegalArgumentException(ERROR_SINGLETON_COLLECTION + value);
        }

        return value.iterator().next();
    }
Extract one and only value from singleton collection.

@param value singleton collection
@return value
@throws IllegalArgumentException if the given collection is null or contains
                                 zero or more than one element
clickhouse-data/src/main/java/com/clickhouse/data/ClickHouseValues.java