tinkerpop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dkuppitz (GitHub) <git...@apache.org>
Subject [GitHub] [tinkerpop] dkuppitz commented on pull request #961: TINKERPOP-2061 Added with() option for traversal configuration
Date Thu, 11 Oct 2018 17:11:15 GMT
Perhaps a little bit more elegant:
```java
    public default TraversalSource with(final String key, final Object value) {
        final OptionsStrategy.Builder builder = OptionsStrategy.build();
        getStrategies().getStrategy(OptionsStrategy.class)
                .ifPresent(optionsStrategy -> optionsStrategy.getOptions().forEach(builder::with));
        builder.with(key, value);
        return withStrategies(builder.create());
    }
```

[ Full content available at: https://github.com/apache/tinkerpop/pull/961 ]
This message was relayed via gitbox.apache.org for dev@tinkerpop.apache.org

Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message