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

        Object v = value.nextElement();
        if (value.hasMoreElements()) {
            throw new IllegalArgumentException(ERROR_SINGLETON_COLLECTION + value);
        }

        return v;
    }
Extract one and only value from singleton enumeration.

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