ImmutableParserConfig with* returns new ImmutableParserConfigs

Project: http://git-wip-us.apache.org/repos/asf/commons-rdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-rdf/commit/db99ef1f
Tree: http://git-wip-us.apache.org/repos/asf/commons-rdf/tree/db99ef1f
Diff: http://git-wip-us.apache.org/repos/asf/commons-rdf/diff/db99ef1f

Branch: refs/heads/fluent-parser-impl
Commit: db99ef1fc9ae1621aa46245145d5618066f53665
Parents: 1125dd8
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Wed Feb 28 23:39:10 2018 +0000
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Wed Feb 28 23:39:10 2018 +0000

----------------------------------------------------------------------
 .../rdf/api/io/ImmutableParserConfigImpl.java       | 14 +++++++-------
 .../org/apache/commons/rdf/api/io/ParserConfig.java | 16 +++++++++++++++-
 2 files changed, 22 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/db99ef1f/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/io/ImmutableParserConfigImpl.java
----------------------------------------------------------------------
diff --git 
a/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/io/ImmutableParserConfigImpl.java
 
b/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/io/ImmutableParserConfigImpl.java
index 25be678..8f6561a 100644
--- 
a/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/io/ImmutableParserConfigImpl.java
+++ 
b/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/io/ImmutableParserConfigImpl.java
@@ -69,34 +69,34 @@ class ImmutableParserConfigImpl implements 
ImmutableParserConfig, Serializable {
        }
 
        @Override
-       public ParserConfig withSyntax(RDFSyntax syntax) {
+       public ImmutableParserConfig withSyntax(RDFSyntax syntax) {
                return new WithSyntax(this, syntax);
        }
 
        @SuppressWarnings("rawtypes")
        @Override
-       public ParserConfig withSource(ParserSource source) {
+       public ImmutableParserConfig withSource(ParserSource source) {
                return new WithSource(this, source);
        }
 
        @SuppressWarnings("rawtypes")
        @Override
-       public ParserConfig withTarget(ParserTarget target) {
+       public ImmutableParserConfig withTarget(ParserTarget target) {
                return new WithTarget(this, target);
        }
 
        @Override
-       public ParserConfig withRDF(RDF rdf) {
+       public ImmutableParserConfig withRDF(RDF rdf) {
                return new WithRDF(this, rdf);
        }
 
        @Override
-       public ParserConfig withBase(IRI base) {
+       public ImmutableParserConfig withBase(IRI base) {
                return new WithBase(this, base);
        }
 
        @Override
-       public <V> ParserConfig withOption(Option<V> o, V v) {
+       public <V> ImmutableParserConfig withOption(Option<V> o, V v) {
                return new WithOption(this, o, v);
        }
 
@@ -115,7 +115,7 @@ class ImmutableParserConfigImpl implements 
ImmutableParserConfig, Serializable {
                @Override
                public Map<Option, Object> options() {
                        // Add to parent options
-                       Map options = super.options();
+                       Map<Option, Object> options = super.options();
                        if (v == null) {
                                options.remove(o);
                        } else {

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/db99ef1f/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/io/ParserConfig.java
----------------------------------------------------------------------
diff --git 
a/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/io/ParserConfig.java 
b/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/io/ParserConfig.java
index 50aa0ae..ece4f48 100644
--- 
a/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/io/ParserConfig.java
+++ 
b/commons-rdf-api/src/main/java/org/apache/commons/rdf/api/io/ParserConfig.java
@@ -70,6 +70,20 @@ public interface ParserConfig {
                }
        }
        
-       interface ImmutableParserConfig extends ParserConfig, Serializable {} 
+       interface ImmutableParserConfig extends ParserConfig, Serializable {
+               ImmutableParserConfig withSyntax(RDFSyntax syntax);
+
+               ImmutableParserConfig withSource(ParserSource source);
+
+               ImmutableParserConfig withTarget(ParserTarget target);
+
+               ImmutableParserConfig withRDF(RDF rdf);
+
+               ImmutableParserConfig withBase(IRI base);
+
+               <V> ImmutableParserConfig withOption(Option<V> o, V v); 
+               
+               
+       } 
 
 }

Reply via email to