@SuppressWarnings("unchecked")
    public <T, K extends T> K valueByType(final Class<T> type) {
        final List<ConfigPath> items = findAllByType(type)
                .stream().filter(Objects::nonNull).collect(Collectors.toList());
        return items.isEmpty() ? null : (K) items.get(0).getValue();
    }
@ SuppressWarnings ( "unchecked" ) public < T , K extends T > K valueByType ( final Class < T > type ) { final List < ConfigPath > items = findAllByType ( type ) . stream ( ) . filter ( Objects :: nonNull ) . collect ( Collectors . toList ( ) ) ; return items . isEmpty ( ) ? null : ( K ) items . get ( 0 ) . getValue ( ) ; }
Behaviour is the same as {@link #valuesByType(Class)}, but only first element is returned.
<p>
Note: uniqueness not guaranteed!

@param type type of required sub configuration object
@param <T>  value type
@param <K>  actual expected sub type (may be the same)
@return value of first compatible type occurrence (first not null value) or null
@see #valueByUniqueDeclaredType(Class) for guaranteed uniquness