public Map<String, Object> toMap() {
        Map<String, Object> result = new HashMap<>();
        for (Entry<Key, Value> keyValueEntry : fields.entrySet()) {
            Key key = keyValueEntry.getKey();
            Value value = keyValueEntry.getValue();
            if (!key.isExtension()) {
                result.put(key.getName(), transformValueToObject(value));
            } else {
                result.put("(" + key.getName() + ")", transformValueToObject(value));
            }
        }
        return result;
    }
public Map < String , Object > toMap ( ) { Map < String , Object > result = new HashMap < > ( ) ; for ( Entry < Key , Value > keyValueEntry : fields . entrySet ( ) ) { Key key = keyValueEntry . getKey ( ) ; Value value = keyValueEntry . getValue ( ) ; if ( ! key . isExtension ( ) ) { result . put ( key . getName ( ) , transformValueToObject ( value ) ) ; } else { result . put ( "(" + key . getName ( ) + ")" , transformValueToObject ( value ) ) ; } } return result ; }
Returns a map of option names as keys and option values as values..