jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [03/12] jena git commit: JENA-1107: Changes due to reworking Tuple.
Date Tue, 29 Dec 2015 21:23:24 GMT
JENA-1107: Changes due to reworking Tuple.

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

Branch: refs/heads/master
Commit: c665f63004fee2d465f2cbcb48d2defd17e12858
Parents: 571e975
Author: Andy Seaborne <andy@seaborne.org>
Authored: Mon Dec 28 16:27:48 2015 +0000
Committer: Andy Seaborne <andy@seaborne.org>
Committed: Mon Dec 28 16:27:48 2015 +0000

----------------------------------------------------------------------
 .../atlas/web/auth/ScopedNTAuthenticator.java   |  9 +-
 .../jena/riot/lang/PipedTuplesStream.java       |  2 +-
 .../org/apache/jena/sparql/algebra/OpVars.java  |  9 +-
 .../optimize/TransformFilterImplicitJoin.java   |  4 +-
 .../optimize/TransformImplicitLeftJoin.java     |  4 +-
 .../org/apache/jena/sparql/util/IsoMatcher.java | 12 +--
 .../org/apache/jena/common/TestIsoMatcher.java  |  6 +-
 .../hadoop/rdf/types/NodeTupleWritable.java     | 15 +--
 .../jena/hadoop/rdf/io/types/RdfTypesTest.java  | 16 ++--
 .../io/output/writers/AbstractNodeWriter.java   |  6 +-
 .../org/apache/jena/tdb/base/file/FileSet.java  |  2 +-
 .../org/apache/jena/tdb/index/IndexLib.java     |  2 +-
 .../java/org/apache/jena/tdb/lib/ColumnMap.java | 11 ++-
 .../java/org/apache/jena/tdb/lib/DumpOps.java   |  5 +-
 .../java/org/apache/jena/tdb/lib/TupleLib.java  | 30 +++---
 .../apache/jena/tdb/solver/OpExecutorTDB1.java  |  2 +-
 .../java/org/apache/jena/tdb/solver/QC2.java    |  2 +-
 .../org/apache/jena/tdb/solver/SolverLib.java   | 23 +++--
 .../tdb/solver/StageGeneratorDirectTDB.java     |  2 +-
 .../apache/jena/tdb/solver/StageMatchTuple.java | 24 +++--
 .../apache/jena/tdb/store/DatasetGraphTDB.java  |  2 +-
 .../jena/tdb/store/DatasetPrefixesTDB.java      |  2 +-
 .../org/apache/jena/tdb/store/GraphTDB.java     |  7 +-
 .../org/apache/jena/tdb/store/QuadTable.java    |  2 +-
 .../org/apache/jena/tdb/store/TripleTable.java  |  2 +-
 .../store/bulkloader/LoaderNodeTupleTable.java  |  2 +-
 .../tdb/store/bulkloader2/CmdIndexCopy.java     |  2 +-
 .../store/nodetupletable/NodeTupleTable.java    |  2 +-
 .../nodetupletable/NodeTupleTableConcrete.java  |  9 +-
 .../nodetupletable/NodeTupleTableView.java      | 13 ++-
 .../nodetupletable/NodeTupleTableWrapper.java   |  2 +-
 .../jena/tdb/store/tupletable/TupleIndex.java   |  4 +-
 .../tdb/store/tupletable/TupleIndexBase.java    | 14 +--
 .../tdb/store/tupletable/TupleIndexRecord.java  | 12 +--
 .../tdb/store/tupletable/TupleIndexWrapper.java |  2 +-
 .../jena/tdb/store/tupletable/TupleTable.java   | 14 +--
 .../java/org/apache/jena/tdb/sys/DebugTDB.java  |  2 +-
 .../java/org/apache/jena/tdb/sys/FileRef.java   |  2 +-
 jena-tdb/src/main/java/tdb/tdbstats.java        |  2 +-
 jena-tdb/src/main/java/tdb/tools/dumpbpt.java   |  2 +-
 .../src/main/java/tdb/tools/tdbgenindex.java    |  2 +-
 .../org/apache/jena/tdb/lib/TestColumnMap.java  | 24 ++---
 .../org/apache/jena/tdb/solver/TestStats.java   |  2 +-
 .../apache/jena/tdb/store/TestQuadFilter.java   |  4 +-
 .../tupletable/AbstractTestTupleIndex.java      | 96 ++++++++++----------
 .../store/tupletable/TestTupleIndexRecord.java  |  2 +-
 .../tupletable/TestTupleIndexRecordDirect.java  | 64 +++++++------
 .../tdb/store/tupletable/TestTupleTable.java    | 30 +++---
 48 files changed, 260 insertions(+), 249 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-arq/src/main/java/org/apache/jena/atlas/web/auth/ScopedNTAuthenticator.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/atlas/web/auth/ScopedNTAuthenticator.java b/jena-arq/src/main/java/org/apache/jena/atlas/web/auth/ScopedNTAuthenticator.java
index 84f10f5..f389855 100644
--- a/jena-arq/src/main/java/org/apache/jena/atlas/web/auth/ScopedNTAuthenticator.java
+++ b/jena-arq/src/main/java/org/apache/jena/atlas/web/auth/ScopedNTAuthenticator.java
@@ -26,7 +26,8 @@ import java.util.Map.Entry;
 import org.apache.http.auth.Credentials;
 import org.apache.http.auth.NTCredentials;
 import org.apache.jena.atlas.lib.Pair;
-import org.apache.jena.atlas.lib.Tuple;
+import org.apache.jena.atlas.lib.tuple.Tuple ;
+import org.apache.jena.atlas.lib.tuple.TupleFactory ;
 
 /**
  * <p>
@@ -62,7 +63,7 @@ public class ScopedNTAuthenticator extends AbstractScopedAuthenticator<Pair<Tupl
     public ScopedNTAuthenticator(URI target, String username, char[] password, String workstation, String domain) {
         if (target == null)
             throw new IllegalArgumentException("Target URI cannot be null");
-        this.credentials.put(target, Pair.create(Tuple.createTuple(username, workstation, domain), password));
+        this.credentials.put(target, Pair.create(TupleFactory.tuple(username, workstation, domain), password));
     }
 
     /**
@@ -80,7 +81,7 @@ public class ScopedNTAuthenticator extends AbstractScopedAuthenticator<Pair<Tupl
                 continue;
             if (entry.getValue().getLeft() == null)
                 throw new IllegalArgumentException("Credentials tuple should be non-null");
-            if (entry.getValue().getLeft().size() < 3)
+            if (entry.getValue().getLeft().len() < 3)
                 throw new IllegalArgumentException(
                         "Credentials tuple should contain at least three fields, 0 = user name, 1 = workstation, 2 = domain");
             this.credentials.put(entry.getKey(), entry.getValue());
@@ -105,7 +106,7 @@ public class ScopedNTAuthenticator extends AbstractScopedAuthenticator<Pair<Tupl
     public void addCredentials(URI target, String username, char[] password, String workstation, String domain) {
         if (target == null)
             throw new IllegalArgumentException("Target URI cannot be null");
-        this.credentials.put(target, Pair.create(Tuple.createTuple(username, workstation, domain), password));
+        this.credentials.put(target, Pair.create(TupleFactory.tuple(username, workstation, domain), password));
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-arq/src/main/java/org/apache/jena/riot/lang/PipedTuplesStream.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/lang/PipedTuplesStream.java b/jena-arq/src/main/java/org/apache/jena/riot/lang/PipedTuplesStream.java
index 599d9ec..4bdb728 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/lang/PipedTuplesStream.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/lang/PipedTuplesStream.java
@@ -18,7 +18,7 @@
 
 package org.apache.jena.riot.lang ;
 
-import org.apache.jena.atlas.lib.Tuple ;
+import org.apache.jena.atlas.lib.tuple.Tuple ;
 import org.apache.jena.graph.Node ;
 import org.apache.jena.graph.Triple ;
 import org.apache.jena.riot.system.StreamRDF ;

http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpVars.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpVars.java b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpVars.java
index 79fb69a..c2d9905 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpVars.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpVars.java
@@ -23,7 +23,8 @@ import static org.apache.jena.sparql.core.Vars.addVar ;
 import java.util.* ;
 
 import org.apache.jena.atlas.lib.SetUtils ;
-import org.apache.jena.atlas.lib.Tuple ;
+import org.apache.jena.atlas.lib.tuple.Tuple ;
+import org.apache.jena.atlas.lib.tuple.TupleFactory ;
 import org.apache.jena.graph.Node ;
 import org.apache.jena.graph.Triple ;
 import org.apache.jena.sparql.algebra.OpWalker.WalkerVisitor ;
@@ -67,7 +68,6 @@ public class OpVars
         OpWalker.walk(new WalkerVisitorFixed(visitor, acc), op) ;
     }
     
-    @SuppressWarnings("unchecked")
     public static Tuple<Set<Var>> mentionedVarsByPosition(Op op) {
         Set<Var> graphAcc = collector() ;
         Set<Var> subjAcc = collector() ;
@@ -76,10 +76,9 @@ public class OpVars
         Set<Var> unknownAcc = collector() ;
         OpVarsPatternWithPositions visitor = new OpVarsPatternWithPositions(graphAcc, subjAcc, predAcc, objAcc, unknownAcc, false);
         OpWalker.walk(op, visitor);
-        return Tuple.createTuple(graphAcc, subjAcc, predAcc, objAcc, unknownAcc);
+        return TupleFactory.tuple(graphAcc, subjAcc, predAcc, objAcc, unknownAcc);
     }
     
-    @SuppressWarnings("unchecked")
     public static Tuple<Set<Var>> mentionedVarsByPosition(Op... ops) {
         Set<Var> graphAcc = collector() ;
         Set<Var> subjAcc = collector() ;
@@ -89,7 +88,7 @@ public class OpVars
         OpVarsPatternWithPositions visitor = new OpVarsPatternWithPositions(graphAcc, subjAcc, predAcc, objAcc, unknownAcc, false);
         for (Op op : ops)
             OpWalker.walk(op, visitor);
-        return Tuple.createTuple(graphAcc, subjAcc, predAcc, objAcc, unknownAcc);
+        return TupleFactory.tuple(graphAcc, subjAcc, predAcc, objAcc, unknownAcc);
     }
 
     // All mentioned variables regardless of scope/visibility.

http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/TransformFilterImplicitJoin.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/TransformFilterImplicitJoin.java b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/TransformFilterImplicitJoin.java
index 48de6f0..93bceba 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/TransformFilterImplicitJoin.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/TransformFilterImplicitJoin.java
@@ -27,7 +27,7 @@ import java.util.List;
 import java.util.Set;
 
 import org.apache.jena.atlas.lib.Pair;
-import org.apache.jena.atlas.lib.Tuple;
+import org.apache.jena.atlas.lib.tuple.Tuple ;
 import org.apache.jena.sparql.algebra.Op ;
 import org.apache.jena.sparql.algebra.OpVars ;
 import org.apache.jena.sparql.algebra.TransformCopy ;
@@ -217,7 +217,7 @@ public class TransformFilterImplicitJoin extends TransformCopy {
         // substitution will be safe
 
         // Should get 5 sets
-        if (varsByPosition.size() != 5)
+        if (varsByPosition.len() != 5)
             return false;
 
         // If anything is used in the object/unknown position then we

http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/TransformImplicitLeftJoin.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/TransformImplicitLeftJoin.java b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/TransformImplicitLeftJoin.java
index cfb0215..b785a51 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/TransformImplicitLeftJoin.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/TransformImplicitLeftJoin.java
@@ -27,7 +27,7 @@ import java.util.List;
 import java.util.Set;
 
 import org.apache.jena.atlas.lib.Pair;
-import org.apache.jena.atlas.lib.Tuple;
+import org.apache.jena.atlas.lib.tuple.Tuple ;
 import org.apache.jena.sparql.algebra.Op ;
 import org.apache.jena.sparql.algebra.OpVars ;
 import org.apache.jena.sparql.algebra.TransformCopy ;
@@ -261,7 +261,7 @@ public class TransformImplicitLeftJoin extends TransformCopy {
         // substitution will be safe
 
         // Should get 5 sets
-        if (varsByPosition.size() != 5)
+        if (varsByPosition.len() != 5)
             return false;
 
         // If anything is used in the object/unknown position then we

http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-arq/src/main/java/org/apache/jena/sparql/util/IsoMatcher.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/util/IsoMatcher.java b/jena-arq/src/main/java/org/apache/jena/sparql/util/IsoMatcher.java
index 4656039..57a84a6 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/util/IsoMatcher.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/util/IsoMatcher.java
@@ -18,14 +18,14 @@
 
 package org.apache.jena.sparql.util ;
 
-import static org.apache.jena.atlas.lib.Tuple.createTuple ;
+import static org.apache.jena.atlas.lib.tuple.TupleFactory.tuple ;
 
 import java.util.ArrayList ;
 import java.util.Collection ;
 import java.util.Iterator ;
 import java.util.List ;
 
-import org.apache.jena.atlas.lib.Tuple ;
+import org.apache.jena.atlas.lib.tuple.Tuple ;
 import org.apache.jena.graph.Graph ;
 import org.apache.jena.graph.Node ;
 import org.apache.jena.graph.Triple ;
@@ -148,7 +148,7 @@ public class IsoMatcher
         List<Tuple<Node>> tuples = new ArrayList<>() ;
         for ( ; iter.hasNext() ; ) {
             Triple t = iter.next() ;
-            Tuple<Node> tuple = createTuple(t.getSubject(), t.getPredicate(), t.getObject()) ;
+            Tuple<Node> tuple = tuple(t.getSubject(), t.getPredicate(), t.getObject()) ;
             tuples.add(tuple) ;
         }
         return tuples ;
@@ -158,7 +158,7 @@ public class IsoMatcher
         List<Tuple<Node>> tuples = new ArrayList<>() ;
         for ( ; iter.hasNext() ; ) {
             Quad q = iter.next() ;
-            Tuple<Node> tuple = createTuple(q.getGraph(), q.getSubject(), q.getPredicate(), q.getObject()) ;
+            Tuple<Node> tuple = tuple(q.getGraph(), q.getSubject(), q.getPredicate(), q.getObject()) ;
             tuples.add(tuple) ;
         }
         return tuples ;
@@ -229,11 +229,11 @@ public class IsoMatcher
 
     // Maybe several mappings!
     private Mapping gen(Tuple<Node> t1, Tuple<Node> t2, Mapping _mapping) {
-        if ( t1.size() != t2.size() )
+        if ( t1.len() != t2.len() )
             return null ;
         
         Mapping mapping = _mapping ;
-        for ( int i = 0 ; i < t1.size() ; i++ ) {
+        for ( int i = 0 ; i < t1.len() ; i++ ) {
             Node n1 = t1.get(i) ;
             Node n2 = t2.get(i) ;
             if ( ! nodeTest.equal(n1, n2) ) {

http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-arq/src/test/java/org/apache/jena/common/TestIsoMatcher.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/test/java/org/apache/jena/common/TestIsoMatcher.java b/jena-arq/src/test/java/org/apache/jena/common/TestIsoMatcher.java
index a955432..1bc26f0 100644
--- a/jena-arq/src/test/java/org/apache/jena/common/TestIsoMatcher.java
+++ b/jena-arq/src/test/java/org/apache/jena/common/TestIsoMatcher.java
@@ -22,7 +22,8 @@ import java.util.ArrayList ;
 import java.util.List ;
 
 import org.apache.jena.atlas.junit.BaseTest ;
-import org.apache.jena.atlas.lib.Tuple ;
+import org.apache.jena.atlas.lib.tuple.Tuple ;
+import org.apache.jena.atlas.lib.tuple.TupleFactory ;
 import org.apache.jena.graph.Graph ;
 import org.apache.jena.graph.Node ;
 import org.apache.jena.sparql.core.DatasetGraph ;
@@ -191,13 +192,12 @@ public class TestIsoMatcher extends BaseTest
         {
             Item item = SSE.parse(s) ;
             List<Node> list = BuilderNode.buildNodeList(item) ;
-            Tuple<Node> tuple = Tuple.create(list.toArray(T)) ;
+            Tuple<Node> tuple = TupleFactory.tuple(list.toArray(T)) ;
             tuples.add(tuple) ;
         }
         return tuples ;
     }
 
-
     private void testGraph(String s1, String s2, boolean iso) {
         testGraph$(s1, s2, iso) ;
         testGraph$(s2, s1, iso) ;

http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-elephas/jena-elephas-common/src/main/java/org/apache/jena/hadoop/rdf/types/NodeTupleWritable.java
----------------------------------------------------------------------
diff --git a/jena-elephas/jena-elephas-common/src/main/java/org/apache/jena/hadoop/rdf/types/NodeTupleWritable.java b/jena-elephas/jena-elephas-common/src/main/java/org/apache/jena/hadoop/rdf/types/NodeTupleWritable.java
index f069191..9bf7309 100644
--- a/jena-elephas/jena-elephas-common/src/main/java/org/apache/jena/hadoop/rdf/types/NodeTupleWritable.java
+++ b/jena-elephas/jena-elephas-common/src/main/java/org/apache/jena/hadoop/rdf/types/NodeTupleWritable.java
@@ -18,10 +18,11 @@
 
 package org.apache.jena.hadoop.rdf.types;
 
-import java.io.DataInput;
-import java.io.IOException;
+import java.io.DataInput;
+import java.io.IOException;
 
-import org.apache.jena.atlas.lib.Tuple ;
+import org.apache.jena.atlas.lib.tuple.Tuple ;
+import org.apache.jena.atlas.lib.tuple.TupleFactory ;
 import org.apache.jena.graph.Node ;
 
 /**
@@ -70,11 +71,13 @@ public class NodeTupleWritable extends AbstractNodeTupleWritable<Tuple<Node>> {
 
     @Override
     protected Tuple<Node> createTuple(Node[] ns) {
-        return Tuple.create(ns);
+        return TupleFactory.create(ns);
     }
 
     @Override
-    protected Node[] createNodes(Tuple<Node> tuple) {
-        return tuple.tuple();
+    protected Node[] createNodes(Tuple<Node> tuple) {
+        Node n[] = new Node[tuple.len()] ;
+        tuple.copyInto(n);
+        return n ;
     }
 }

http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-elephas/jena-elephas-common/src/test/java/org/apache/jena/hadoop/rdf/io/types/RdfTypesTest.java
----------------------------------------------------------------------
diff --git a/jena-elephas/jena-elephas-common/src/test/java/org/apache/jena/hadoop/rdf/io/types/RdfTypesTest.java b/jena-elephas/jena-elephas-common/src/test/java/org/apache/jena/hadoop/rdf/io/types/RdfTypesTest.java
index 176ccd5..9918f2b 100644
--- a/jena-elephas/jena-elephas-common/src/test/java/org/apache/jena/hadoop/rdf/io/types/RdfTypesTest.java
+++ b/jena-elephas/jena-elephas-common/src/test/java/org/apache/jena/hadoop/rdf/io/types/RdfTypesTest.java
@@ -18,16 +18,11 @@
 
 package org.apache.jena.hadoop.rdf.io.types;
 
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.DataInput;
-import java.io.DataInputStream;
-import java.io.DataOutput;
-import java.io.DataOutputStream;
-import java.io.IOException;
+import java.io.* ;
 
 import org.apache.hadoop.io.WritableComparable;
-import org.apache.jena.atlas.lib.Tuple;
+import org.apache.jena.atlas.lib.tuple.Tuple ;
+import static org.apache.jena.atlas.lib.tuple.TupleFactory.tuple ;
 import org.apache.jena.datatypes.xsd.XSDDatatype ;
 import org.apache.jena.graph.Node ;
 import org.apache.jena.graph.NodeFactory ;
@@ -397,8 +392,9 @@ public class RdfTypesTest {
      */
     @Test
     public void tuple_writable_01() throws IOException, InstantiationException, IllegalAccessException, ClassNotFoundException {
-        Tuple<Node> t = Tuple.createTuple(NodeFactory.createURI("http://one"), NodeFactory.createURI("http://two"), NodeFactory.createLiteral("value"),
-                NodeFactory.createLiteral("foo"), NodeFactory.createURI("http://three"));
+        Tuple<Node> t = tuple(NodeFactory.createURI("http://one"), NodeFactory.createURI("http://two"),
+                              NodeFactory.createLiteral("value"),
+                              NodeFactory.createLiteral("foo"), NodeFactory.createURI("http://three"));
         NodeTupleWritable tw = new NodeTupleWritable(t);
         testWriteRead(tw, tw);
     }

http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/output/writers/AbstractNodeWriter.java
----------------------------------------------------------------------
diff --git a/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/output/writers/AbstractNodeWriter.java b/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/output/writers/AbstractNodeWriter.java
index 4ab238f..e46b3e1 100644
--- a/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/output/writers/AbstractNodeWriter.java
+++ b/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/output/writers/AbstractNodeWriter.java
@@ -25,7 +25,7 @@ import org.apache.hadoop.mapreduce.RecordWriter;
 import org.apache.hadoop.mapreduce.TaskAttemptContext;
 import org.apache.jena.atlas.io.AWriter;
 import org.apache.jena.atlas.io.Writer2;
-import org.apache.jena.atlas.lib.Tuple;
+import org.apache.jena.atlas.lib.tuple.Tuple ;
 import org.apache.jena.graph.Node ;
 import org.apache.jena.graph.Triple ;
 import org.apache.jena.hadoop.rdf.types.NodeTupleWritable;
@@ -157,7 +157,9 @@ public abstract class AbstractNodeWriter<TValue> extends RecordWriter<NodeWritab
             this.writeNodes(q.getGraph(), q.getSubject(), q.getPredicate(), q.getObject());
         } else if (value instanceof NodeTupleWritable) {
             Tuple<Node> tuple = ((NodeTupleWritable) value).get();
-            this.writeNodes(tuple.tuple());
+            Node[] n = new Node[tuple.len()] ;
+            tuple.copyInto(n);
+            this.writeNodes(n);
         } else {
             // For arbitrary values just toString() them
             this.writer.write(value.toString());

http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-tdb/src/main/java/org/apache/jena/tdb/base/file/FileSet.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/base/file/FileSet.java b/jena-tdb/src/main/java/org/apache/jena/tdb/base/file/FileSet.java
index 048c6e6..46c0b57 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/base/file/FileSet.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/base/file/FileSet.java
@@ -21,7 +21,7 @@ package org.apache.jena.tdb.base.file ;
 import java.io.File ;
 
 import org.apache.jena.atlas.lib.FileOps ;
-import org.apache.jena.atlas.lib.Tuple ;
+import org.apache.jena.atlas.lib.tuple.Tuple ;
 import org.slf4j.Logger ;
 import org.slf4j.LoggerFactory ;
 

http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-tdb/src/main/java/org/apache/jena/tdb/index/IndexLib.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/index/IndexLib.java b/jena-tdb/src/main/java/org/apache/jena/tdb/index/IndexLib.java
index aed4bb3..2d8b33e 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/index/IndexLib.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/index/IndexLib.java
@@ -21,7 +21,7 @@ package org.apache.jena.tdb.index;
 
 import java.util.Iterator;
 
-import org.apache.jena.atlas.lib.Tuple ;
+import org.apache.jena.atlas.lib.tuple.Tuple ;
 import org.apache.jena.tdb.store.NodeId ;
 
 public class IndexLib

http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-tdb/src/main/java/org/apache/jena/tdb/lib/ColumnMap.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/lib/ColumnMap.java b/jena-tdb/src/main/java/org/apache/jena/tdb/lib/ColumnMap.java
index a98ac28..dd0571b 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/lib/ColumnMap.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/lib/ColumnMap.java
@@ -26,7 +26,8 @@ import java.util.List ;
 import org.apache.jena.atlas.AtlasException ;
 import org.apache.jena.atlas.lib.ListUtils ;
 import org.apache.jena.atlas.lib.StrUtils ;
-import org.apache.jena.atlas.lib.Tuple ;
+import org.apache.jena.atlas.lib.tuple.Tuple ;
+import org.apache.jena.atlas.lib.tuple.TupleFactory ;
 
 
 
@@ -155,17 +156,17 @@ public class ColumnMap
     private <T> Tuple<T> map(Tuple<T> src, int[] map)
     {
         @SuppressWarnings("unchecked")
-        T[] elts = (T[])new Object[src.size()] ;
+        T[] elts = (T[])new Object[src.len()] ;
         
-        for ( int i = 0 ; i < src.size() ; i++ )
+        for ( int i = 0 ; i < src.len() ; i++ )
         {
             int j = map[i] ;
             elts[j] = src.get(i) ;
         }
-        return Tuple.create(elts) ;
+        return TupleFactory.asTuple(elts) ;
     }
     
-    /** Compile a mapping encoded as single charcaters e.g. "SPO", "POS" */
+    /** Compile a mapping encoded as single characters e.g. "SPO", "POS" */
     static int[] compileMapping(String domain, String range)
     {
         List<Character> input = StrUtils.toCharList(domain) ;

http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-tdb/src/main/java/org/apache/jena/tdb/lib/DumpOps.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/lib/DumpOps.java b/jena-tdb/src/main/java/org/apache/jena/tdb/lib/DumpOps.java
index 9622cef..8265d33 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/lib/DumpOps.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/lib/DumpOps.java
@@ -29,7 +29,8 @@ import jena.cmd.CmdException;
 import org.apache.jena.atlas.io.IndentedWriter ;
 import org.apache.jena.atlas.lib.ByteBufferLib ;
 import org.apache.jena.atlas.lib.Pair ;
-import org.apache.jena.atlas.lib.Tuple ;
+import org.apache.jena.atlas.lib.tuple.Tuple ;
+import org.apache.jena.atlas.lib.tuple.TupleFactory ;
 import org.apache.jena.graph.Node ;
 import org.apache.jena.query.Dataset ;
 import org.apache.jena.riot.out.NodeFmtLib ;
@@ -172,7 +173,7 @@ public class DumpOps
         NodeId[] nodeIds = new NodeId[N] ;
         Arrays.fill(nodeIds, NodeId.NodeIdAny) ;
         
-        Tuple<NodeId> t = Tuple.create(nodeIds) ;
+        Tuple<NodeId> t = TupleFactory.asTuple(nodeIds) ;
 
         Iterator<Tuple<NodeId>> iter = tupleTable.find(t) ;
         for ( ; iter.hasNext() ; )

http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-tdb/src/main/java/org/apache/jena/tdb/lib/TupleLib.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/lib/TupleLib.java b/jena-tdb/src/main/java/org/apache/jena/tdb/lib/TupleLib.java
index 9549d6c..dd42a67 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/lib/TupleLib.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/lib/TupleLib.java
@@ -21,14 +21,12 @@ package org.apache.jena.tdb.lib;
 import static org.apache.jena.tdb.sys.SystemTDB.SizeOfLong ;
 
 import java.util.Iterator;
+
 import org.apache.jena.atlas.iterator.Iter ;
 import org.apache.jena.atlas.lib.Bytes ;
 import org.apache.jena.atlas.lib.InternalErrorException ;
-import org.apache.jena.atlas.lib.Tuple ;
-
-
-
-
+import org.apache.jena.atlas.lib.tuple.Tuple ;
+import org.apache.jena.atlas.lib.tuple.TupleFactory ;
 import org.apache.jena.graph.Node ;
 import org.apache.jena.graph.Triple ;
 import org.apache.jena.sparql.core.Quad ;
@@ -63,25 +61,25 @@ public class TupleLib
     
     public static Tuple<Node> tupleNodes(NodeTable nodeTable, Tuple<NodeId> ids) 
     {
-        int N = ids.size() ;
+        int N = ids.len() ;
         Node[] n = new Node[N] ;
         for ( int i = 0 ; i < N ; i++ )
             n[i] = nodeTable.getNodeForNodeId(ids.get(i)) ;
-        return Tuple.create(n) ;
+        return TupleFactory.asTuple(n) ;
     }
     
     public static Tuple<NodeId> tupleNodeIds(NodeTable nodeTable, Tuple<Node> nodes) 
     {
-        int N = nodes.size() ;
+        int N = nodes.len() ;
         NodeId[] n = new NodeId[N] ;
         for ( int i = 0 ; i < N ; i++ )
             n[i] = nodeTable.getNodeIdForNode(nodes.get(i)) ;
-        return Tuple.create(n) ;
+        return TupleFactory.asTuple(n) ;
     }
     
     private static Triple triple(NodeTable nodeTable, Tuple<NodeId> tuple) 
     {
-        if ( tuple.size() != 3 )
+        if ( tuple.len() != 3 )
             throw new TDBException("Tuple is not of length 3: "+tuple) ;
         return triple(nodeTable, tuple.get(0), tuple.get(1), tuple.get(2)) ;
     }
@@ -120,7 +118,7 @@ public class TupleLib
     
     private static Quad quad(NodeTable nodeTable, Tuple<NodeId> tuple) 
     {
-        if ( tuple.size() != 4 )
+        if ( tuple.len() != 4 )
             throw new TDBException("Tuple is not of length 4: "+tuple) ;
         return quad(nodeTable, tuple.get(0), tuple.get(1), tuple.get(2), tuple.get(3)) ;
     }
@@ -147,14 +145,13 @@ public class TupleLib
                 j = cMap.fetchSlotIdx(i) ;
             nodeIds[j] = id ;
         }
-        return Tuple.create(nodeIds) ;
+        return TupleFactory.asTuple(nodeIds) ;
     }
 
-
     public static Record record(RecordFactory factory, Tuple<NodeId> tuple, ColumnMap cMap) 
     {
-        byte[] b = new byte[tuple.size()*NodeId.SIZE] ;
-        for ( int i = 0 ; i < tuple.size() ; i++ )
+        byte[] b = new byte[tuple.len()*NodeId.SIZE] ;
+        for ( int i = 0 ; i < tuple.len() ; i++ )
         {
             int j = cMap.mapSlotIdx(i) ;
             // i'th Nodeid goes to j'th bytes slot.
@@ -163,7 +160,4 @@ public class TupleLib
             
         return factory.create(b) ;
     }
-
-
-
 }

http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-tdb/src/main/java/org/apache/jena/tdb/solver/OpExecutorTDB1.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/solver/OpExecutorTDB1.java b/jena-tdb/src/main/java/org/apache/jena/tdb/solver/OpExecutorTDB1.java
index eeff69c..f039baa 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/solver/OpExecutorTDB1.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/solver/OpExecutorTDB1.java
@@ -20,7 +20,7 @@ package org.apache.jena.tdb.solver;
 
 import java.util.function.Predicate;
 
-import org.apache.jena.atlas.lib.Tuple;
+import org.apache.jena.atlas.lib.tuple.Tuple ;
 import org.apache.jena.atlas.logging.Log ;
 import org.apache.jena.graph.Graph ;
 import org.apache.jena.graph.Node ;

http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-tdb/src/main/java/org/apache/jena/tdb/solver/QC2.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/solver/QC2.java b/jena-tdb/src/main/java/org/apache/jena/tdb/solver/QC2.java
index 331ac59..ac05a76 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/solver/QC2.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/solver/QC2.java
@@ -20,7 +20,7 @@ package org.apache.jena.tdb.solver;
 
 import java.util.function.Predicate;
 
-import org.apache.jena.atlas.lib.Tuple ;
+import org.apache.jena.atlas.lib.tuple.Tuple ;
 import org.apache.jena.sparql.util.Context ;
 import org.apache.jena.tdb.TDBException ;
 import org.apache.jena.tdb.store.NodeId ;

http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-tdb/src/main/java/org/apache/jena/tdb/solver/SolverLib.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/solver/SolverLib.java b/jena-tdb/src/main/java/org/apache/jena/tdb/solver/SolverLib.java
index cf813e1..d9d469d 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/solver/SolverLib.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/solver/SolverLib.java
@@ -18,15 +18,17 @@
 
 package org.apache.jena.tdb.solver;
 
+import static org.apache.jena.atlas.lib.tuple.TupleFactory.tuple ;
 import static org.apache.jena.tdb.lib.Lib2.printAbbrev ;
 
 import java.util.* ;
-import java.util.function.Consumer;
 import java.util.function.Function;
 import java.util.function.Predicate;
 
-import org.apache.jena.atlas.iterator.* ;
-import org.apache.jena.atlas.lib.Tuple ;
+import org.apache.jena.atlas.iterator.Iter ;
+import org.apache.jena.atlas.iterator.IteratorWrapper ;
+import org.apache.jena.atlas.lib.tuple.Tuple ;
+import org.apache.jena.atlas.lib.tuple.TupleFactory ;
 import org.apache.jena.graph.Node ;
 import org.apache.jena.graph.Triple ;
 import org.apache.jena.query.QueryCancelledException ;
@@ -122,10 +124,10 @@ public class SolverLib
             Tuple<Node> tuple = null ;
             if ( graphNode == null )
                 // 3-tuples
-                tuple = Tuple.createTuple(triple.getSubject(), triple.getPredicate(), triple.getObject()) ;
+                tuple = tuple(triple.getSubject(), triple.getPredicate(), triple.getObject()) ;
             else
                 // 4-tuples.
-                tuple = Tuple.createTuple(graphNode, triple.getSubject(), triple.getPredicate(), triple.getObject()) ;
+                tuple = tuple(graphNode, triple.getSubject(), triple.getPredicate(), triple.getObject()) ;
             chain = solve(nodeTupleTable, tuple, anyGraph, chain, filter, execCxt) ;
             chain = makeAbortable(chain, killList) ; 
         }
@@ -296,8 +298,7 @@ public class SolverLib
         if ( filter != null )
             iter1 = Iter.filter(iter1, filter) ;
 
-        Iterator<NodeId> iter2 = Tuple.project(0, iter1) ;
-        // Project is cheap - don't brother wrapping iter1
+        Iterator<NodeId> iter2 = Iter.map(iter1, (t) -> t.get(0)) ;
         iter2 = makeAbortable(iter2, killList) ;
 
         Iterator<NodeId> iter3 = Iter.distinct(iter2) ;
@@ -331,7 +332,7 @@ public class SolverLib
     public static Iterator<Tuple<NodeId>> unionGraph(NodeTupleTable ntt)
     {
         Iterator<Tuple<NodeId>> iter = ntt.find((NodeId)null, null, null, null) ;
-        iter = Iter.operate(iter, quadsToAnyTriples) ;
+        iter = Iter.map(iter, quadsToAnyTriples) ;
         //iterMatches = Iter.distinct(iterMatches) ;
         
         // This depends on the way indexes are choose and
@@ -343,7 +344,9 @@ public class SolverLib
         return iter ;
     }
     
+    
     // -- Mutating "transform in place"
-    private static Consumer<Tuple<NodeId>> quadsToAnyTriples = item -> item.tuple()[0] = NodeId.NodeIdAny ;
-
+    private static Function<Tuple<NodeId>, Tuple<NodeId>> quadsToAnyTriples = item -> {
+        return TupleFactory.create4(NodeId.NodeIdAny, item.get(1), item.get(2), item.get(3) ) ;
+    } ;
 }

http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-tdb/src/main/java/org/apache/jena/tdb/solver/StageGeneratorDirectTDB.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/solver/StageGeneratorDirectTDB.java b/jena-tdb/src/main/java/org/apache/jena/tdb/solver/StageGeneratorDirectTDB.java
index 78bd791..061662f 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/solver/StageGeneratorDirectTDB.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/solver/StageGeneratorDirectTDB.java
@@ -20,7 +20,7 @@ package org.apache.jena.tdb.solver;
 
 import java.util.function.Predicate;
 
-import org.apache.jena.atlas.lib.Tuple;
+import org.apache.jena.atlas.lib.tuple.Tuple ;
 import org.apache.jena.graph.Graph ;
 import org.apache.jena.sparql.core.BasicPattern ;
 import org.apache.jena.sparql.engine.ExecutionContext ;

http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-tdb/src/main/java/org/apache/jena/tdb/solver/StageMatchTuple.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/solver/StageMatchTuple.java b/jena-tdb/src/main/java/org/apache/jena/tdb/solver/StageMatchTuple.java
index 398502e..3a25b48 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/solver/StageMatchTuple.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/solver/StageMatchTuple.java
@@ -19,14 +19,18 @@
 package org.apache.jena.tdb.solver;
 
 
+import static org.apache.jena.atlas.lib.tuple.TupleFactory.* ;
+
 import java.util.Iterator;
 import java.util.List;
-import java.util.function.Consumer;
 import java.util.function.Function;
 import java.util.function.Predicate;
 
-import org.apache.jena.atlas.iterator.* ;
-import org.apache.jena.atlas.lib.Tuple ;
+import org.apache.jena.atlas.iterator.Iter ;
+import org.apache.jena.atlas.iterator.NullIterator ;
+import org.apache.jena.atlas.iterator.RepeatApplyIterator ;
+import org.apache.jena.atlas.lib.tuple.Tuple ;
+import org.apache.jena.atlas.lib.tuple.TupleFactory ;
 import org.apache.jena.graph.Node ;
 import org.apache.jena.sparql.core.Var ;
 import org.apache.jena.sparql.engine.ExecutionContext ;
@@ -64,7 +68,7 @@ public class StageMatchTuple extends RepeatApplyIterator<BindingNodeId>
     {
         // Process the Node to NodeId conversion ourselves because
         // we wish to abort if an unknown node is seen.
-        for ( int i = 0 ; i < patternTuple.size() ; i++ )
+        for ( int i = 0 ; i < patternTuple.len() ; i++ )
         {
             Node n = patternTuple.get(i) ;
             // Substitution and turning into NodeIds
@@ -82,13 +86,13 @@ public class StageMatchTuple extends RepeatApplyIterator<BindingNodeId>
     protected Iterator<BindingNodeId> makeNextStage(final BindingNodeId input)
     {
         // ---- Convert to NodeIds 
-        NodeId ids[] = new NodeId[patternTuple.size()] ;
+        NodeId ids[] = new NodeId[patternTuple.len()] ;
         // Variables for this tuple after subsitution
-        final Var[] var = new Var[patternTuple.size()] ;
+        final Var[] var = new Var[patternTuple.len()] ;
 
         prepare(nodeTupleTable.getNodeTable(), patternTuple, input, ids, var) ;
         
-        Iterator<Tuple<NodeId>> iterMatches = nodeTupleTable.find(Tuple.create(ids)) ;  
+        Iterator<Tuple<NodeId>> iterMatches = nodeTupleTable.find(asTuple(ids)) ;  
         
         // ** Allow a triple or quad filter here.
         if ( filter != null )
@@ -102,7 +106,7 @@ public class StageMatchTuple extends RepeatApplyIterator<BindingNodeId>
         // Assumes that tuples are not shared.
         if ( anyGraphs )
         {
-            iterMatches = Iter.operate(iterMatches, quadsToAnyTriples) ;
+            iterMatches = Iter.map(iterMatches, quadsToAnyTriples) ;
             //Guaranteed 
             //iterMatches = Iter.distinct(iterMatches) ;
             
@@ -186,5 +190,7 @@ public class StageMatchTuple extends RepeatApplyIterator<BindingNodeId>
     }
     
     // -- Mutating "transform in place"
-    private static Consumer<Tuple<NodeId>> quadsToAnyTriples = item -> item.tuple()[0] = NodeId.NodeIdAny ;
+    private static Function<Tuple<NodeId>, Tuple<NodeId>> quadsToAnyTriples = item -> {
+        return TupleFactory.create4(NodeId.NodeIdAny, item.get(1), item.get(2), item.get(3) ) ;
+    } ;
 }

http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-tdb/src/main/java/org/apache/jena/tdb/store/DatasetGraphTDB.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/store/DatasetGraphTDB.java b/jena-tdb/src/main/java/org/apache/jena/tdb/store/DatasetGraphTDB.java
index c35862a..41d8781 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/store/DatasetGraphTDB.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/store/DatasetGraphTDB.java
@@ -24,7 +24,7 @@ import java.util.Iterator ;
 import org.apache.jena.atlas.iterator.Iter ;
 import org.apache.jena.atlas.lib.Closeable ;
 import org.apache.jena.atlas.lib.Sync ;
-import org.apache.jena.atlas.lib.Tuple ;
+import org.apache.jena.atlas.lib.tuple.Tuple ;
 import org.apache.jena.graph.Graph ;
 import org.apache.jena.graph.Node ;
 import org.apache.jena.graph.Triple ;

http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-tdb/src/main/java/org/apache/jena/tdb/store/DatasetPrefixesTDB.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/store/DatasetPrefixesTDB.java b/jena-tdb/src/main/java/org/apache/jena/tdb/store/DatasetPrefixesTDB.java
index 03e5b0b..bb7ba33 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/store/DatasetPrefixesTDB.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/store/DatasetPrefixesTDB.java
@@ -21,7 +21,7 @@ package org.apache.jena.tdb.store;
 import java.util.* ;
 
 import org.apache.jena.atlas.iterator.Iter ;
-import org.apache.jena.atlas.lib.Tuple ;
+import org.apache.jena.atlas.lib.tuple.Tuple ;
 import org.apache.jena.atlas.logging.Log ;
 import org.apache.jena.graph.Node ;
 import org.apache.jena.graph.NodeFactory ;

http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-tdb/src/main/java/org/apache/jena/tdb/store/GraphTDB.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/store/GraphTDB.java b/jena-tdb/src/main/java/org/apache/jena/tdb/store/GraphTDB.java
index 012b206..72a5ec9 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/store/GraphTDB.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/store/GraphTDB.java
@@ -24,7 +24,8 @@ import java.util.function.Function;
 import org.apache.jena.atlas.iterator.Iter ;
 import org.apache.jena.atlas.lib.Closeable ;
 import org.apache.jena.atlas.lib.Sync ;
-import org.apache.jena.atlas.lib.Tuple ;
+import org.apache.jena.atlas.lib.tuple.Tuple ;
+import org.apache.jena.atlas.lib.tuple.TupleFactory ;
 import org.apache.jena.graph.* ;
 import org.apache.jena.riot.other.GLib ;
 import org.apache.jena.shared.PrefixMapping ;
@@ -169,9 +170,9 @@ public class GraphTDB extends GraphView implements Closeable, Sync {
     }
 
 	private static Function<Tuple<NodeId>, Tuple<NodeId>> project4TupleTo3Tuple = item -> {
-		if (item.size() != 4)
+		if (item.len() != 4)
 			throw new TDBException("Expected a Tuple of 4, got: " + item);
-		return Tuple.createTuple(item.get(1), item.get(2), item.get(3));
+		return TupleFactory.tuple(item.get(1), item.get(2), item.get(3));
 	};
 
     // Convert from Iterator<Quad> to Iterator<Triple>

http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-tdb/src/main/java/org/apache/jena/tdb/store/QuadTable.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/store/QuadTable.java b/jena-tdb/src/main/java/org/apache/jena/tdb/store/QuadTable.java
index 313d8d5..582ec98 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/store/QuadTable.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/store/QuadTable.java
@@ -21,7 +21,7 @@ package org.apache.jena.tdb.store;
 
 import java.util.Iterator ;
 import org.apache.jena.atlas.iterator.NullIterator ;
-import org.apache.jena.atlas.lib.Tuple ;
+import org.apache.jena.atlas.lib.tuple.Tuple ;
 import org.apache.jena.graph.Node ;
 import org.apache.jena.graph.Triple ;
 import org.apache.jena.sparql.core.Quad ;

http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-tdb/src/main/java/org/apache/jena/tdb/store/TripleTable.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/store/TripleTable.java b/jena-tdb/src/main/java/org/apache/jena/tdb/store/TripleTable.java
index 5dfc17e..22b9925 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/store/TripleTable.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/store/TripleTable.java
@@ -21,7 +21,7 @@ package org.apache.jena.tdb.store;
 
 import java.util.Iterator ;
 import org.apache.jena.atlas.iterator.NullIterator ;
-import org.apache.jena.atlas.lib.Tuple ;
+import org.apache.jena.atlas.lib.tuple.Tuple ;
 import org.apache.jena.graph.Node ;
 import org.apache.jena.graph.Triple ;
 import org.apache.jena.tdb.lib.TupleLib ;

http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader/LoaderNodeTupleTable.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader/LoaderNodeTupleTable.java b/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader/LoaderNodeTupleTable.java
index 3307f1d..71c3b30 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader/LoaderNodeTupleTable.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader/LoaderNodeTupleTable.java
@@ -23,7 +23,7 @@ import java.util.Iterator ;
 import org.apache.jena.atlas.lib.ArrayUtils ;
 import org.apache.jena.atlas.lib.Closeable ;
 import org.apache.jena.atlas.lib.Sync ;
-import org.apache.jena.atlas.lib.Tuple ;
+import org.apache.jena.atlas.lib.tuple.Tuple ;
 import org.apache.jena.graph.Node ;
 import org.apache.jena.tdb.store.NodeId ;
 import org.apache.jena.tdb.store.nodetupletable.NodeTupleTable ;

http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader2/CmdIndexCopy.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader2/CmdIndexCopy.java b/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader2/CmdIndexCopy.java
index 4cb191c..efcda1a 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader2/CmdIndexCopy.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader2/CmdIndexCopy.java
@@ -21,7 +21,7 @@ package org.apache.jena.tdb.store.bulkloader2;
 import java.util.Iterator ;
 
 import org.apache.jena.atlas.lib.DateTimeUtils ;
-import org.apache.jena.atlas.lib.Tuple ;
+import org.apache.jena.atlas.lib.tuple.Tuple ;
 import org.apache.jena.atlas.logging.LogCtl ;
 import org.apache.jena.atlas.logging.ProgressLogger ;
 import org.apache.jena.tdb.base.file.Location ;

http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-tdb/src/main/java/org/apache/jena/tdb/store/nodetupletable/NodeTupleTable.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/store/nodetupletable/NodeTupleTable.java b/jena-tdb/src/main/java/org/apache/jena/tdb/store/nodetupletable/NodeTupleTable.java
index cc8c915..fc85bc2 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/store/nodetupletable/NodeTupleTable.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/store/nodetupletable/NodeTupleTable.java
@@ -22,7 +22,7 @@ import java.util.Iterator ;
 
 import org.apache.jena.atlas.lib.Closeable ;
 import org.apache.jena.atlas.lib.Sync ;
-import org.apache.jena.atlas.lib.Tuple ;
+import org.apache.jena.atlas.lib.tuple.Tuple ;
 import org.apache.jena.graph.Node ;
 import org.apache.jena.tdb.store.NodeId ;
 import org.apache.jena.tdb.store.nodetable.NodeTable ;

http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-tdb/src/main/java/org/apache/jena/tdb/store/nodetupletable/NodeTupleTableConcrete.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/store/nodetupletable/NodeTupleTableConcrete.java b/jena-tdb/src/main/java/org/apache/jena/tdb/store/nodetupletable/NodeTupleTableConcrete.java
index 2c9a579..4aa4d07 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/store/nodetupletable/NodeTupleTableConcrete.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/store/nodetupletable/NodeTupleTableConcrete.java
@@ -24,7 +24,8 @@ import java.util.Iterator ;
 
 import org.apache.jena.atlas.iterator.Iter ;
 import org.apache.jena.atlas.iterator.NullIterator ;
-import org.apache.jena.atlas.lib.Tuple ;
+import org.apache.jena.atlas.lib.tuple.Tuple ;
+import org.apache.jena.atlas.lib.tuple.TupleFactory ;
 import org.apache.jena.graph.Node ;
 import org.apache.jena.tdb.TDBException ;
 import org.apache.jena.tdb.lib.TupleLib ;
@@ -83,7 +84,7 @@ public class NodeTupleTableConcrete implements NodeTupleTable
             for (int i = 0; i < nodes.length; i++)
                 n[i] = nodeTable.getAllocateNodeId(nodes[i]) ;
 
-            Tuple<NodeId> t = Tuple.create(n) ;
+            Tuple<NodeId> t = TupleFactory.tuple(n) ;
             return tupleTable.add(t) ;
         } finally
         {
@@ -105,7 +106,7 @@ public class NodeTupleTableConcrete implements NodeTupleTable
                 n[i] = id ;
             }
 
-            Tuple<NodeId> t = Tuple.create(n) ;
+            Tuple<NodeId> t = TupleFactory.tuple(n) ;
             return tupleTable.delete(t) ;
         } finally
         {
@@ -151,7 +152,7 @@ public class NodeTupleTableConcrete implements NodeTupleTable
     @Override
     public Iterator<Tuple<NodeId>> find(NodeId... ids)
     {
-        Tuple<NodeId> tuple = Tuple.create(ids) ;
+        Tuple<NodeId> tuple = TupleFactory.tuple(ids) ;
         return find(tuple) ;
     }
 

http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-tdb/src/main/java/org/apache/jena/tdb/store/nodetupletable/NodeTupleTableView.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/store/nodetupletable/NodeTupleTableView.java b/jena-tdb/src/main/java/org/apache/jena/tdb/store/nodetupletable/NodeTupleTableView.java
index f5cacf4..83244fd 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/store/nodetupletable/NodeTupleTableView.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/store/nodetupletable/NodeTupleTableView.java
@@ -21,7 +21,7 @@ package org.apache.jena.tdb.store.nodetupletable;
 import java.util.Iterator ;
 
 import org.apache.jena.atlas.lib.ArrayUtils ;
-import org.apache.jena.atlas.lib.Tuple ;
+import org.apache.jena.atlas.lib.tuple.Tuple ;
 import org.apache.jena.graph.Node ;
 import org.apache.jena.tdb.store.NodeId ;
 import org.apache.jena.tdb.store.tupletable.TupleTable ;
@@ -71,6 +71,15 @@ public class NodeTupleTableView extends NodeTupleTableWrapper
         return array2 ;
     }
 
+    private static <T> T[] push(Class<T> cls, T x,  Tuple<T> tuple)
+    {
+        T[] array2 = ArrayUtils.alloc(cls, tuple.len()+1) ;
+        tuple.copyInto(array2, 1);
+        array2[0] = x ;
+        return array2 ;
+    }
+
+
     @Override
     public Iterator<Tuple<NodeId>> find(NodeId... ids)
     {
@@ -81,7 +90,7 @@ public class NodeTupleTableView extends NodeTupleTableWrapper
     @Override
     public Iterator<Tuple<NodeId>> find(Tuple<NodeId> ids)
     {
-        NodeId[] ids2 = push(NodeId.class, prefixId, ids.tuple()) ;
+        NodeId[] ids2 = push(NodeId.class, prefixId, ids) ;
         return nodeTupleTable.find(ids2) ;
     }
 

http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-tdb/src/main/java/org/apache/jena/tdb/store/nodetupletable/NodeTupleTableWrapper.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/store/nodetupletable/NodeTupleTableWrapper.java b/jena-tdb/src/main/java/org/apache/jena/tdb/store/nodetupletable/NodeTupleTableWrapper.java
index 35e5111..172e1d9 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/store/nodetupletable/NodeTupleTableWrapper.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/store/nodetupletable/NodeTupleTableWrapper.java
@@ -20,7 +20,7 @@ package org.apache.jena.tdb.store.nodetupletable;
 
 import java.util.Iterator ;
 
-import org.apache.jena.atlas.lib.Tuple ;
+import org.apache.jena.atlas.lib.tuple.Tuple ;
 import org.apache.jena.graph.Node ;
 import org.apache.jena.tdb.store.NodeId ;
 import org.apache.jena.tdb.store.nodetable.NodeTable ;

http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-tdb/src/main/java/org/apache/jena/tdb/store/tupletable/TupleIndex.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/store/tupletable/TupleIndex.java b/jena-tdb/src/main/java/org/apache/jena/tdb/store/tupletable/TupleIndex.java
index 17bfb2d..92e82b5 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/store/tupletable/TupleIndex.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/store/tupletable/TupleIndex.java
@@ -24,7 +24,7 @@ import java.util.function.Predicate ;
 import org.apache.jena.atlas.iterator.Iter ;
 import org.apache.jena.atlas.lib.Closeable ;
 import org.apache.jena.atlas.lib.Sync ;
-import org.apache.jena.atlas.lib.Tuple ;
+import org.apache.jena.atlas.lib.tuple.Tuple ;
 import org.apache.jena.tdb.lib.ColumnMap ;
 import org.apache.jena.tdb.store.NodeId ;
 
@@ -70,7 +70,7 @@ public interface TupleIndex extends Sync, Closeable
     public void clear() ;
     
     public static Iterator<Tuple<NodeId>> scan(Iterator<Tuple<NodeId>> iter, Tuple<NodeId> pattern) {
-        int tupleLength = pattern.size() ; 
+        int tupleLength = pattern.len() ; 
         Predicate<Tuple<NodeId>> filter = new Predicate<Tuple<NodeId>>()
         {
             @Override

http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-tdb/src/main/java/org/apache/jena/tdb/store/tupletable/TupleIndexBase.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/store/tupletable/TupleIndexBase.java b/jena-tdb/src/main/java/org/apache/jena/tdb/store/tupletable/TupleIndexBase.java
index 601b971..fa5dcef 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/store/tupletable/TupleIndexBase.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/store/tupletable/TupleIndexBase.java
@@ -20,7 +20,7 @@ package org.apache.jena.tdb.store.tupletable;
 
 import java.util.Iterator ;
 
-import org.apache.jena.atlas.lib.Tuple ;
+import org.apache.jena.atlas.lib.tuple.Tuple ;
 import org.apache.jena.tdb.TDBException ;
 import org.apache.jena.tdb.lib.ColumnMap ;
 import org.apache.jena.tdb.store.NodeId ;
@@ -56,8 +56,8 @@ public abstract class TupleIndexBase implements TupleIndex
     { 
         if ( Check )
         {
-            if ( tupleLength != tuple.size() )
-            throw new TDBException(String.format("Mismatch: tuple length %d / index for length %d", tuple.size(), tupleLength)) ;
+            if ( tupleLength != tuple.len() )
+            throw new TDBException(String.format("Mismatch: tuple length %d / index for length %d", tuple.len(), tupleLength)) ;
         }
         return performAdd(tuple) ;
     }
@@ -67,8 +67,8 @@ public abstract class TupleIndexBase implements TupleIndex
     { 
         if ( Check )
         {
-            if ( tupleLength != tuple.size() )
-            throw new TDBException(String.format("Mismatch: tuple length %d / index for length %d", tuple.size(), tupleLength)) ;
+            if ( tupleLength != tuple.len() )
+            throw new TDBException(String.format("Mismatch: tuple length %d / index for length %d", tuple.len(), tupleLength)) ;
         }
 
         return performDelete(tuple) ;
@@ -82,8 +82,8 @@ public abstract class TupleIndexBase implements TupleIndex
     {
         if ( Check )
         {
-            if ( tupleLength != pattern.size() )
-            throw new TDBException(String.format("Mismatch: tuple length %d / index for length %d", pattern.size(), tupleLength)) ;
+            if ( tupleLength != pattern.len() )
+            throw new TDBException(String.format("Mismatch: tuple length %d / index for length %d", pattern.len(), tupleLength)) ;
         } 
         // null to NodeId.NodIdAny ??
         return performFind(pattern) ;

http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-tdb/src/main/java/org/apache/jena/tdb/store/tupletable/TupleIndexRecord.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/store/tupletable/TupleIndexRecord.java b/jena-tdb/src/main/java/org/apache/jena/tdb/store/tupletable/TupleIndexRecord.java
index 6042563..9f721d5 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/store/tupletable/TupleIndexRecord.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/store/tupletable/TupleIndexRecord.java
@@ -25,9 +25,7 @@ import java.util.Iterator;
 
 import org.apache.jena.atlas.iterator.* ;
 import org.apache.jena.atlas.lib.Bytes ;
-import org.apache.jena.atlas.lib.Tuple ;
-
-
+import org.apache.jena.atlas.lib.tuple.Tuple ;
 import org.apache.jena.tdb.TDBException ;
 import org.apache.jena.tdb.base.record.Record ;
 import org.apache.jena.tdb.base.record.RecordFactory ;
@@ -96,8 +94,8 @@ public class TupleIndexRecord extends TupleIndexBase
 
     private Iterator<Tuple<NodeId>> findWorker(Tuple<NodeId> patternNaturalOrder, boolean partialScanAllowed, boolean fullScanAllowed) {
         if ( Check ) {
-            if ( tupleLength != patternNaturalOrder.size() )
-                throw new TDBException(String.format("Mismatch: tuple length %d / index for length %d", patternNaturalOrder.size(),
+            if ( tupleLength != patternNaturalOrder.len() )
+                throw new TDBException(String.format("Mismatch: tuple length %d / index for length %d", patternNaturalOrder.len(),
                                                      tupleLength));
         }
 
@@ -115,7 +113,7 @@ public class TupleIndexRecord extends TupleIndexBase
         Record maxRec = factory.createKeyOnly();
 
         // Set the prefixes.
-        for ( int i = 0 ; i < pattern.size() ; i++ ) {
+        for ( int i = 0 ; i < pattern.len() ; i++ ) {
             NodeId X = pattern.get(i);
             if ( NodeId.isAny(X) ) {
                 X = null;
@@ -133,7 +131,7 @@ public class TupleIndexRecord extends TupleIndexBase
         }
 
         // Is it a simple existence test?
-        if ( numSlots == pattern.size() ) {
+        if ( numSlots == pattern.len() ) {
             if ( index.contains(minRec) )
                 return new SingletonIterator<>(pattern);
             else

http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-tdb/src/main/java/org/apache/jena/tdb/store/tupletable/TupleIndexWrapper.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/store/tupletable/TupleIndexWrapper.java b/jena-tdb/src/main/java/org/apache/jena/tdb/store/tupletable/TupleIndexWrapper.java
index 1b86a90..ef0fd4e 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/store/tupletable/TupleIndexWrapper.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/store/tupletable/TupleIndexWrapper.java
@@ -20,7 +20,7 @@ package org.apache.jena.tdb.store.tupletable;
 
 import java.util.Iterator ;
 
-import org.apache.jena.atlas.lib.Tuple ;
+import org.apache.jena.atlas.lib.tuple.Tuple ;
 import org.apache.jena.tdb.lib.ColumnMap ;
 import org.apache.jena.tdb.store.NodeId ;
 import org.apache.jena.tdb.store.tupletable.TupleIndex ;

http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-tdb/src/main/java/org/apache/jena/tdb/store/tupletable/TupleTable.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/store/tupletable/TupleTable.java b/jena-tdb/src/main/java/org/apache/jena/tdb/store/tupletable/TupleTable.java
index 2f7e372..40cc878 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/store/tupletable/TupleTable.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/store/tupletable/TupleTable.java
@@ -24,7 +24,7 @@ import java.util.Iterator ;
 
 import org.apache.jena.atlas.lib.Closeable ;
 import org.apache.jena.atlas.lib.Sync ;
-import org.apache.jena.atlas.lib.Tuple ;
+import org.apache.jena.atlas.lib.tuple.Tuple ;
 import org.apache.jena.atlas.logging.Log ;
 import org.apache.jena.tdb.TDBException ;
 import org.apache.jena.tdb.store.NodeId ;
@@ -85,8 +85,8 @@ public class TupleTable implements Sync, Closeable
     /** Insert a tuple - return true if it was really added, false if it was a duplicate */
     public boolean add(Tuple<NodeId> t) 
     { 
-        if ( tupleLen != t.size() )
-            throw new TDBException(format("Mismatch: inserting tuple of length %d into a table of tuples of length %d", t.size(), tupleLen)) ;
+        if ( tupleLen != t.len() )
+            throw new TDBException(format("Mismatch: inserting tuple of length %d into a table of tuples of length %d", t.len(), tupleLen)) ;
 
         for ( int i = 0 ; i < indexes.length ; i++ )
         {
@@ -134,8 +134,8 @@ public class TupleTable implements Sync, Closeable
     /** Delete a tuple - return true if it was deleted, false if it didn't exist */
     public boolean delete( Tuple<NodeId> t ) 
     { 
-        if ( tupleLen != t.size() )
-            throw new TDBException(format("Mismatch: deleting tuple of length %d from a table of tuples of length %d", t.size(), tupleLen)) ;
+        if ( tupleLen != t.len() )
+            throw new TDBException(format("Mismatch: deleting tuple of length %d from a table of tuples of length %d", t.len(), tupleLen)) ;
 
         boolean rc = false ;
         for ( TupleIndex indexe : indexes )
@@ -164,8 +164,8 @@ public class TupleTable implements Sync, Closeable
 //                log.warn("find(Tuple<NodeId> pattern): Null found: "+pattern) ;
 //        }
         
-        if ( tupleLen != pattern.size() )
-            throw new TDBException(format("Mismatch: finding tuple of length %d in a table of tuples of length %d", pattern.size(), tupleLen)) ;
+        if ( tupleLen != pattern.len() )
+            throw new TDBException(format("Mismatch: finding tuple of length %d in a table of tuples of length %d", pattern.len(), tupleLen)) ;
         
         int numSlots = 0 ;
         // Canonical form. 

http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-tdb/src/main/java/org/apache/jena/tdb/sys/DebugTDB.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/sys/DebugTDB.java b/jena-tdb/src/main/java/org/apache/jena/tdb/sys/DebugTDB.java
index cb5db48..23aea77 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/sys/DebugTDB.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/sys/DebugTDB.java
@@ -20,7 +20,7 @@ package org.apache.jena.tdb.sys;
 
 import java.util.Iterator ;
 
-import org.apache.jena.atlas.lib.Tuple ;
+import org.apache.jena.atlas.lib.tuple.Tuple ;
 import org.apache.jena.graph.Node ;
 import org.apache.jena.tdb.base.file.Location ;
 import org.apache.jena.tdb.base.record.Record ;

http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-tdb/src/main/java/org/apache/jena/tdb/sys/FileRef.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/sys/FileRef.java b/jena-tdb/src/main/java/org/apache/jena/tdb/sys/FileRef.java
index af70467..db0a8f6 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/sys/FileRef.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/sys/FileRef.java
@@ -24,7 +24,7 @@ import java.util.Objects;
 import java.util.TreeMap ;
 
 import org.apache.jena.atlas.lib.FileOps ;
-import org.apache.jena.atlas.lib.Tuple ;
+import org.apache.jena.atlas.lib.tuple.Tuple ;
 import org.apache.jena.atlas.logging.Log ;
 import org.apache.jena.tdb.TDBException ;
 import org.apache.jena.tdb.base.file.FileSet ;

http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-tdb/src/main/java/tdb/tdbstats.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/tdb/tdbstats.java b/jena-tdb/src/main/java/tdb/tdbstats.java
index 60588fd..115c487 100644
--- a/jena-tdb/src/main/java/tdb/tdbstats.java
+++ b/jena-tdb/src/main/java/tdb/tdbstats.java
@@ -20,7 +20,7 @@ package tdb;
 
 import java.util.Iterator ;
 
-import org.apache.jena.atlas.lib.Tuple ;
+import org.apache.jena.atlas.lib.tuple.Tuple ;
 import org.apache.jena.atlas.logging.Log ;
 import org.apache.jena.graph.Node ;
 import org.apache.jena.sparql.core.Quad ;

http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-tdb/src/main/java/tdb/tools/dumpbpt.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/tdb/tools/dumpbpt.java b/jena-tdb/src/main/java/tdb/tools/dumpbpt.java
index abe29d8..269150e 100644
--- a/jena-tdb/src/main/java/tdb/tools/dumpbpt.java
+++ b/jena-tdb/src/main/java/tdb/tools/dumpbpt.java
@@ -24,7 +24,7 @@ import java.util.Iterator ;
 import java.util.List ;
 
 import org.apache.jena.atlas.lib.Lib ;
-import org.apache.jena.atlas.lib.Tuple ;
+import org.apache.jena.atlas.lib.tuple.Tuple ;
 import org.apache.jena.atlas.logging.LogCtl ;
 import org.apache.jena.tdb.base.file.Location ;
 import org.apache.jena.tdb.base.record.Record ;

http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-tdb/src/main/java/tdb/tools/tdbgenindex.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/tdb/tools/tdbgenindex.java b/jena-tdb/src/main/java/tdb/tools/tdbgenindex.java
index 2114ef7..9371ce2 100644
--- a/jena-tdb/src/main/java/tdb/tools/tdbgenindex.java
+++ b/jena-tdb/src/main/java/tdb/tools/tdbgenindex.java
@@ -21,7 +21,7 @@ package tdb.tools ;
 import java.util.Iterator ;
 
 import org.apache.jena.atlas.lib.Lib ;
-import org.apache.jena.atlas.lib.Tuple ;
+import org.apache.jena.atlas.lib.tuple.Tuple ;
 import org.apache.jena.tdb.base.file.Location ;
 import org.apache.jena.tdb.store.NodeId ;
 import org.apache.jena.tdb.store.tupletable.TupleIndex ;

http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-tdb/src/test/java/org/apache/jena/tdb/lib/TestColumnMap.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/test/java/org/apache/jena/tdb/lib/TestColumnMap.java b/jena-tdb/src/test/java/org/apache/jena/tdb/lib/TestColumnMap.java
index b14846a..bcd53c9 100644
--- a/jena-tdb/src/test/java/org/apache/jena/tdb/lib/TestColumnMap.java
+++ b/jena-tdb/src/test/java/org/apache/jena/tdb/lib/TestColumnMap.java
@@ -18,11 +18,11 @@
 
 package org.apache.jena.tdb.lib;
 
+import static org.apache.jena.atlas.lib.tuple.TupleFactory.* ;
+
 import org.apache.jena.atlas.junit.BaseTest ;
-import org.apache.jena.atlas.lib.Tuple ;
+import org.apache.jena.atlas.lib.tuple.Tuple ;
 import org.apache.jena.tdb.lib.ColumnMap ;
-
-import static org.apache.jena.atlas.lib.Tuple.* ;
 import org.junit.Test ;
 
 public class TestColumnMap extends BaseTest
@@ -49,16 +49,16 @@ public class TestColumnMap extends BaseTest
     @Test public void remap3() 
     {
         ColumnMap x = new ColumnMap("POS", 2,0,1) ;
-        Tuple<String> tuple = createTuple("S", "P", "O") ;
+        Tuple<String> tuple = tuple("S", "P", "O") ;
         Tuple<String> mapped = x.map(tuple) ;
-        Tuple<String> expected = createTuple("P", "O", "S") ;
+        Tuple<String> expected = tuple("P", "O", "S") ;
         assertEquals(expected, mapped) ;
     }
     
     @Test public void remap4() 
     {
         ColumnMap x = new ColumnMap("POS", 2,0,1) ;
-        Tuple<String> tuple = createTuple("S", "P", "O") ;
+        Tuple<String> tuple = tuple("S", "P", "O") ;
         Tuple<String> tuple2 = x.map(tuple) ;
         tuple2 = x.unmap(tuple2) ;
         assertEquals(tuple, tuple2) ;
@@ -82,12 +82,12 @@ public class TestColumnMap extends BaseTest
     @Test public void map1()
     {
         ColumnMap cmap = new ColumnMap("GSPO", "OSPG") ;
-        Tuple<String> tuple = createTuple("G", "S", "P", "O") ;
+        Tuple<String> tuple = tuple("G", "S", "P", "O") ;
         Tuple<String> mapped = cmap.map(tuple) ;
-        Tuple<String> expected = createTuple("O", "S", "P", "G") ;
+        Tuple<String> expected = tuple("O", "S", "P", "G") ;
         assertEquals(expected, mapped) ;
         Tuple<String> unmapped = cmap.unmap(mapped) ;
-        assertEquals(createTuple("G", "S", "P", "O"), unmapped) ;
+        assertEquals(tuple("G", "S", "P", "O"), unmapped) ;
     }
 
     @Test public void map2()
@@ -96,13 +96,13 @@ public class TestColumnMap extends BaseTest
         String[] y = { "O", "S", "P", "G" } ;
         
         ColumnMap cmap = new ColumnMap("Test", x, y) ;
-        Tuple<String> tuple = Tuple.create(x) ;
+        Tuple<String> tuple = tuple(x) ;
         Tuple<String> mapped = cmap.map(tuple) ;
         
-        Tuple<String> expected = Tuple.create(y) ;
+        Tuple<String> expected = tuple(y) ;
         assertEquals(expected, mapped) ;
         Tuple<String> unmapped = cmap.unmap(mapped) ;
-        assertEquals(Tuple.create(x), unmapped) ;
+        assertEquals(tuple(x), unmapped) ;
     }
     
 }

http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-tdb/src/test/java/org/apache/jena/tdb/solver/TestStats.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/test/java/org/apache/jena/tdb/solver/TestStats.java b/jena-tdb/src/test/java/org/apache/jena/tdb/solver/TestStats.java
index 65a25e2..ff8e0e9 100644
--- a/jena-tdb/src/test/java/org/apache/jena/tdb/solver/TestStats.java
+++ b/jena-tdb/src/test/java/org/apache/jena/tdb/solver/TestStats.java
@@ -21,7 +21,7 @@ package org.apache.jena.tdb.solver;
 import java.util.Iterator ;
 
 import org.apache.jena.atlas.junit.BaseTest ;
-import org.apache.jena.atlas.lib.Tuple ;
+import org.apache.jena.atlas.lib.tuple.Tuple ;
 import org.apache.jena.graph.NodeFactory ;
 import org.apache.jena.sparql.core.Quad ;
 import org.apache.jena.sparql.sse.SSE ;

http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-tdb/src/test/java/org/apache/jena/tdb/store/TestQuadFilter.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/test/java/org/apache/jena/tdb/store/TestQuadFilter.java b/jena-tdb/src/test/java/org/apache/jena/tdb/store/TestQuadFilter.java
index 9752dac..a22bd03 100644
--- a/jena-tdb/src/test/java/org/apache/jena/tdb/store/TestQuadFilter.java
+++ b/jena-tdb/src/test/java/org/apache/jena/tdb/store/TestQuadFilter.java
@@ -21,7 +21,7 @@ package org.apache.jena.tdb.store;
 import java.util.function.Predicate;
 
 import org.apache.jena.atlas.junit.BaseTest ;
-import org.apache.jena.atlas.lib.Tuple ;
+import org.apache.jena.atlas.lib.tuple.Tuple ;
 import org.apache.jena.graph.NodeFactory ;
 import org.apache.jena.query.* ;
 import org.apache.jena.sparql.core.Quad ;
@@ -67,7 +67,7 @@ public class TestQuadFilter extends BaseTest
         DatasetGraphTDB dsg = (DatasetGraphTDB)(ds.asDatasetGraph()) ;
         final NodeTable nodeTable = dsg.getQuadTable().getNodeTupleTable().getNodeTable() ;
         final NodeId target = nodeTable.getNodeIdForNode(NodeFactory.createURI(graphToHide)) ;
-        return item -> !( item.size() == 4 && item.get(0).equals(target) );
+        return item -> !( item.len() == 4 && item.get(0).equals(target) );
     }            
 
     @Test public void quad_filter_1()   { test("SELECT * { GRAPH ?g { ?s ?p ?o } }", 1, 2) ; }

http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-tdb/src/test/java/org/apache/jena/tdb/store/tupletable/AbstractTestTupleIndex.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/test/java/org/apache/jena/tdb/store/tupletable/AbstractTestTupleIndex.java b/jena-tdb/src/test/java/org/apache/jena/tdb/store/tupletable/AbstractTestTupleIndex.java
index 45dc467..a2621aa 100644
--- a/jena-tdb/src/test/java/org/apache/jena/tdb/store/tupletable/AbstractTestTupleIndex.java
+++ b/jena-tdb/src/test/java/org/apache/jena/tdb/store/tupletable/AbstractTestTupleIndex.java
@@ -23,10 +23,10 @@ import java.util.Set ;
 
 import org.apache.jena.atlas.iterator.Iter ;
 import org.apache.jena.atlas.junit.BaseTest ;
-import org.apache.jena.atlas.lib.Tuple ;
+import org.apache.jena.atlas.lib.tuple.Tuple ;
+import org.apache.jena.atlas.lib.tuple.TupleFactory ;
 import org.apache.jena.tdb.store.NodeId ;
 import org.apache.jena.tdb.store.tupletable.TupleIndex ;
-import static org.apache.jena.atlas.lib.Tuple.* ;
 import org.junit.Test ;
 
 /** Test TupleIndexes (general) */
@@ -39,26 +39,26 @@ public abstract class AbstractTestTupleIndex extends BaseTest
     protected static NodeId n5 = new NodeId(0x5555555555555555L) ;
     protected static NodeId n6 = new NodeId(0x6666666666666666L) ; 
     
-    protected abstract TupleIndex create(String description) ;
+    protected abstract TupleIndex createIndex(String description) ;
     
     protected static void add(TupleIndex index, NodeId x1, NodeId x2, NodeId x3)
     {
-        Tuple<NodeId> tuple = createTuple(x1, x2, x3) ;
+        Tuple<NodeId> tuple = TupleFactory.tuple(x1, x2, x3) ;
         index.add(tuple) ;
     }
     
     @Test public void TupleIndex_1()
     {
-        TupleIndex index = create("SPO") ;
+        TupleIndex index = createIndex("SPO") ;
         add(index, n1, n2, n3) ;
     }
     
     @Test public void TupleIndexRecordSPO_1()
     {
-        TupleIndex index = create("SPO") ;
+        TupleIndex index = createIndex("SPO") ;
         add(index, n1, n2, n3) ;
         
-        Tuple<NodeId> tuple2 = createTuple(n1, n2, n3) ;
+        Tuple<NodeId> tuple2 = TupleFactory.tuple(n1, n2, n3) ;
         Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
         assertTrue(iter.hasNext()) ;
         iter.next();
@@ -67,10 +67,10 @@ public abstract class AbstractTestTupleIndex extends BaseTest
  
     @Test public void TupleIndexRecordSPO_2()
     {
-        TupleIndex index = create("SPO") ;
+        TupleIndex index = createIndex("SPO") ;
         add(index, n1, n2, n3) ;
         
-        Tuple<NodeId> tuple2 = createTuple(n1, n2, null) ;
+        Tuple<NodeId> tuple2 = TupleFactory.tuple(n1, n2, null) ;
         Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
         assertTrue(iter.hasNext()) ;
         iter.next();
@@ -79,10 +79,10 @@ public abstract class AbstractTestTupleIndex extends BaseTest
     
     @Test public void TupleIndexRecordSPO_3()
     {
-        TupleIndex index = create("SPO") ;
+        TupleIndex index = createIndex("SPO") ;
         add(index, n1, n2, n3) ;
         
-        Tuple<NodeId> tuple2 = createTuple(n1, null, n3) ;
+        Tuple<NodeId> tuple2 = TupleFactory.tuple(n1, null, n3) ;
         Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
         assertTrue(iter.hasNext()) ;
         iter.next();
@@ -91,10 +91,10 @@ public abstract class AbstractTestTupleIndex extends BaseTest
     
     @Test public void TupleIndexRecordSPO_4()
     {
-        TupleIndex index = create("SPO") ;
+        TupleIndex index = createIndex("SPO") ;
         add(index, n1, n2, n3) ;
         
-        Tuple<NodeId> tuple2 = createTuple(n1, NodeId.NodeIdAny, NodeId.NodeIdAny) ;
+        Tuple<NodeId> tuple2 = TupleFactory.tuple(n1, NodeId.NodeIdAny, NodeId.NodeIdAny) ;
         Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
         assertTrue(iter.hasNext()) ;
         iter.next();
@@ -103,74 +103,74 @@ public abstract class AbstractTestTupleIndex extends BaseTest
     
     @Test public void TupleIndexRecordSPO_5()
     {
-        TupleIndex index = create("SPO") ;
+        TupleIndex index = createIndex("SPO") ;
         add(index, n1, n2, n3) ;
         add(index, n1, n2, n4) ;
         
-        Tuple<NodeId> tuple2 = createTuple(n1, n2, n3) ;
+        Tuple<NodeId> tuple2 = TupleFactory.tuple(n1, n2, n3) ;
         Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
         Set<Tuple<NodeId>> x = Iter.toSet(iter) ;
         assertEquals(1, x.size()) ;
-        assertTrue(x.contains(createTuple(n1, n2, n3))) ;
-        assertFalse(x.contains(createTuple(n1, n2, n4))) ;
+        assertTrue(x.contains(TupleFactory.tuple(n1, n2, n3))) ;
+        assertFalse(x.contains(TupleFactory.tuple(n1, n2, n4))) ;
     }
 
     @Test public void TupleIndexRecordSPO_6()
     {
-        TupleIndex index = create("SPO") ;
+        TupleIndex index = createIndex("SPO") ;
         add(index, n1, n2, n3) ;
         add(index, n1, n2, n4) ;
         
-        Tuple<NodeId> tuple2 = createTuple(n1, n2, NodeId.NodeIdAny) ;
+        Tuple<NodeId> tuple2 = TupleFactory.tuple(n1, n2, NodeId.NodeIdAny) ;
         Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
         Set<Tuple<NodeId>> x = Iter.toSet(iter) ;
         assertEquals(2, x.size()) ;
-        assertTrue(x.contains(createTuple(n1, n2, n3))) ;
-        assertTrue(x.contains(createTuple(n1, n2, n4))) ;
+        assertTrue(x.contains(TupleFactory.tuple(n1, n2, n3))) ;
+        assertTrue(x.contains(TupleFactory.tuple(n1, n2, n4))) ;
     }
 
     @Test public void TupleIndexRecordSPO_7()
     {
-        TupleIndex index = create("SPO") ;
+        TupleIndex index = createIndex("SPO") ;
         add(index, n1, n2, n3) ;
         add(index, n1, n2, n4) ;
         
-        Tuple<NodeId> tuple2 = createTuple(n1, NodeId.NodeIdAny, NodeId.NodeIdAny) ;
+        Tuple<NodeId> tuple2 = TupleFactory.tuple(n1, NodeId.NodeIdAny, NodeId.NodeIdAny) ;
         Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
         Set<Tuple<NodeId>> x = Iter.toSet(iter) ;
         assertEquals(2, x.size()) ;
-        assertTrue(x.contains(createTuple(n1, n2, n3))) ;
-        assertTrue(x.contains(createTuple(n1, n2, n4))) ;
+        assertTrue(x.contains(TupleFactory.tuple(n1, n2, n3))) ;
+        assertTrue(x.contains(TupleFactory.tuple(n1, n2, n4))) ;
     }
 
     @Test public void TupleIndexRecordSPO_8()
     {
-        TupleIndex index = create("SPO") ;
+        TupleIndex index = createIndex("SPO") ;
         add(index, n1, n2, n3) ;
         add(index, n2, n3, n4) ;
 
         {
-            Tuple<NodeId> tuple2 = createTuple(n1, NodeId.NodeIdAny, NodeId.NodeIdAny) ;
+            Tuple<NodeId> tuple2 = TupleFactory.tuple(n1, NodeId.NodeIdAny, NodeId.NodeIdAny) ;
             Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
             Set<Tuple<NodeId>> x = Iter.toSet(iter) ;
             assertEquals(1, x.size()) ;
-            assertTrue(x.contains(createTuple(n1, n2, n3))) ;
+            assertTrue(x.contains(TupleFactory.tuple(n1, n2, n3))) ;
         }
 
         {
-            Tuple<NodeId> tuple2 = createTuple(n2, NodeId.NodeIdAny, NodeId.NodeIdAny) ;
+            Tuple<NodeId> tuple2 = TupleFactory.tuple(n2, NodeId.NodeIdAny, NodeId.NodeIdAny) ;
             Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
             Set<Tuple<NodeId>> x = Iter.toSet(iter) ;
             assertEquals(1, x.size()) ;
-            assertTrue(x.contains(createTuple(n2, n3, n4))) ;
+            assertTrue(x.contains(TupleFactory.tuple(n2, n3, n4))) ;
         }
     }
 
     @Test public void TupleIndexRecordPOS_1()
     {
-        TupleIndex index = create("POS") ;
+        TupleIndex index = createIndex("POS") ;
         add(index, n1, n2, n3) ;
-        Tuple<NodeId> tuple2 = createTuple(n1, n2, n3) ;
+        Tuple<NodeId> tuple2 = TupleFactory.tuple(n1, n2, n3) ;
         Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
         assertTrue("Can't find tuple", iter.hasNext()) ;
         iter.next();
@@ -179,10 +179,10 @@ public abstract class AbstractTestTupleIndex extends BaseTest
  
     @Test public void TupleIndexRecordPOS_2()
     {
-        TupleIndex index = create("POS") ;
+        TupleIndex index = createIndex("POS") ;
         add(index, n1, n2, n3) ;
         
-        Tuple<NodeId> tuple2 = createTuple(null, n2, null) ;
+        Tuple<NodeId> tuple2 = TupleFactory.tuple(null, n2, null) ;
         Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
         assertTrue("Can't find tuple",iter.hasNext()) ;
         iter.next();
@@ -192,10 +192,10 @@ public abstract class AbstractTestTupleIndex extends BaseTest
 
     @Test public void TupleIndexRecordPOS_3()
     {
-        TupleIndex index = create("POS") ;
+        TupleIndex index = createIndex("POS") ;
         add(index, n1, n2, n3) ;
         
-        Tuple<NodeId> tuple2 = createTuple(null, n2, n3) ;
+        Tuple<NodeId> tuple2 = TupleFactory.tuple(null, n2, n3) ;
         Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
         assertTrue("Can't find tuple", iter.hasNext()) ;
         iter.next();
@@ -204,10 +204,10 @@ public abstract class AbstractTestTupleIndex extends BaseTest
 
     @Test public void TupleIndexRecordFindNot_1()
     {
-        TupleIndex index = create("SPO") ;
+        TupleIndex index = createIndex("SPO") ;
         add(index, n1, n2, n3) ;
         
-        Tuple<NodeId> tuple2 = createTuple(n4, n5, n6) ;
+        Tuple<NodeId> tuple2 = TupleFactory.tuple(n4, n5, n6) ;
         Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
         assertNotNull(iter) ;
         assertFalse(iter.hasNext()) ;
@@ -215,53 +215,53 @@ public abstract class AbstractTestTupleIndex extends BaseTest
     
     @Test public void TupleIndexRecordFindNot_2()
     {
-        TupleIndex index = create("SPO") ;
+        TupleIndex index = createIndex("SPO") ;
         add(index, n1, n2, n3) ;
         
-        Tuple<NodeId> tuple2 = createTuple(n1, n5, n6) ;
+        Tuple<NodeId> tuple2 = TupleFactory.tuple(n1, n5, n6) ;
         Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
         assertFalse(iter.hasNext()) ;
    }
 
     @Test public void TupleIndexRecordFindNot_3()
     {
-        TupleIndex index = create("SPO") ;
+        TupleIndex index = createIndex("SPO") ;
         add(index, n1, n2, n3) ;
         
-        Tuple<NodeId> tuple2 = createTuple(n1, null, n6) ;
+        Tuple<NodeId> tuple2 = TupleFactory.tuple(n1, null, n6) ;
         Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
         assertFalse(iter.hasNext()) ;
    }
 
     @Test public void TupleIndexRecordFindNot_4()
     {
-        TupleIndex index = create("SPO") ;
+        TupleIndex index = createIndex("SPO") ;
         add(index, n1, n2, n3) ;
         add(index, n1, n5, n6) ;
         
-        Tuple<NodeId> tuple2 = createTuple(n4, n5, n6) ;
+        Tuple<NodeId> tuple2 = TupleFactory.tuple(n4, n5, n6) ;
         Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
         assertFalse(iter.hasNext()) ;
    }
     
     @Test public void TupleIndexRecordFindNot_5()
     {
-        TupleIndex index = create("SPO") ;
+        TupleIndex index = createIndex("SPO") ;
         add(index, n1, n2, n3) ;
         add(index, n1, n5, n6) ;
         
-        Tuple<NodeId> tuple2 = createTuple(n2, n5, n6) ;
+        Tuple<NodeId> tuple2 = TupleFactory.tuple(n2, n5, n6) ;
         Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
         assertFalse(iter.hasNext()) ;
    }
 
     @Test public void TupleIndexRecordFindNot_6()
     {
-        TupleIndex index = create("SPO") ;
+        TupleIndex index = createIndex("SPO") ;
         add(index, n1, n2, n3) ;
         add(index, n4, n5, n6) ;
         
-        Tuple<NodeId> tuple2 = createTuple(n1, null, n6) ;
+        Tuple<NodeId> tuple2 = TupleFactory.tuple(n1, null, n6) ;
         Iterator<Tuple<NodeId>> iter = index.find(tuple2) ;
         assertFalse(iter.hasNext()) ;
    }

http://git-wip-us.apache.org/repos/asf/jena/blob/c665f630/jena-tdb/src/test/java/org/apache/jena/tdb/store/tupletable/TestTupleIndexRecord.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/test/java/org/apache/jena/tdb/store/tupletable/TestTupleIndexRecord.java b/jena-tdb/src/test/java/org/apache/jena/tdb/store/tupletable/TestTupleIndexRecord.java
index 9925f87..0d906d8 100644
--- a/jena-tdb/src/test/java/org/apache/jena/tdb/store/tupletable/TestTupleIndexRecord.java
+++ b/jena-tdb/src/test/java/org/apache/jena/tdb/store/tupletable/TestTupleIndexRecord.java
@@ -34,7 +34,7 @@ public class TestTupleIndexRecord extends AbstractTestTupleIndex
     static RecordFactory factory = new RecordFactory(3*SystemTDB.SizeOfNodeId, 0) ;
     
     @Override
-    protected TupleIndexRecord create(String description)
+    protected TupleIndexRecord createIndex(String description)
     {
         IndexParams indexParams = StoreParams.getDftStoreParams() ; 
         RangeIndex rIdx = IndexFactory.buildRangeIndex(FileSet.mem(), factory, indexParams) ;


Mime
View raw message