Repository: tinkerpop
Updated Branches:
  refs/heads/tp33 6c98a3036 -> ae8fee7fd


Removed use of final declartion in docs

Did this in places where it just helped simplify the look of code examples a 
bit. CTR


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

Branch: refs/heads/tp33
Commit: 4d0d4816a076d732826539095791b26260b9bb66
Parents: f411f1d
Author: Stephen Mallette <[email protected]>
Authored: Fri Jun 1 06:13:24 2018 -0400
Committer: Stephen Mallette <[email protected]>
Committed: Fri Jun 1 06:13:24 2018 -0400

----------------------------------------------------------------------
 docs/src/reference/the-graph.asciidoc     | 42 +++++++++++++-------------
 docs/src/reference/the-traversal.asciidoc | 28 ++++++++---------
 2 files changed, 35 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d0d4816/docs/src/reference/the-graph.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/the-graph.asciidoc 
b/docs/src/reference/the-graph.asciidoc
index 9ac83e4..099cd3b 100644
--- a/docs/src/reference/the-graph.asciidoc
+++ b/docs/src/reference/the-graph.asciidoc
@@ -206,9 +206,9 @@ itself can be altered via these `Transaction` methods:
 
 [source,java]
 ----
-public Transaction onReadWrite(final Consumer<Transaction> consumer);
+public Transaction onReadWrite(Consumer<Transaction> consumer);
 
-public Transaction onClose(final Consumer<Transaction> consumer);
+public Transaction onClose(Consumer<Transaction> consumer);
 ----
 
 Providing a `Consumer` function to `onReadWrite` allows definition of how a 
transaction starts when a read or a write
@@ -405,9 +405,9 @@ that file back into a different instance:
 
 [source,java]
 ----
-final Graph graph = TinkerFactory.createModern();
+Graph graph = TinkerFactory.createModern();
 graph.io(IoCore.graphml()).writeGraph("tinkerpop-modern.xml");
-final Graph newGraph = TinkerGraph.open();
+Graph newGraph = TinkerGraph.open();
 newGraph.io(IoCore.graphml()).readGraph("tinkerpop-modern.xml");
 ----
 
@@ -415,13 +415,13 @@ If a custom configuration is required, then have the 
`Graph` generate a `GraphRe
 
 [source,java]
 ----
-final Graph graph = TinkerFactory.createModern();
-try (final OutputStream os = new FileOutputStream("tinkerpop-modern.xml")) {
+Graph graph = TinkerFactory.createModern();
+try (OutputStream os = new FileOutputStream("tinkerpop-modern.xml")) {
     
graph.io(IoCore.graphml()).writer().normalize(true).create().writeGraph(os, 
graph);
 }
 
-final Graph newGraph = TinkerGraph.open();
-try (final InputStream stream = new FileInputStream("tinkerpop-modern.xml")) {
+Graph newGraph = TinkerGraph.open();
+try (InputStream stream = new FileInputStream("tinkerpop-modern.xml")) {
     newGraph.io(IoCore.graphml()).reader().create().readGraph(stream, 
newGraph);
 }
 ----
@@ -469,10 +469,10 @@ called `tinkerpop-modern.json` and then how to read that 
file back into a differ
 
 [source,java]
 ----
-final Graph graph = TinkerFactory.createModern();
+Graph graph = TinkerFactory.createModern();
 graph.io(IoCore.graphson()).writeGraph("tinkerpop-modern.json");
 
-final Graph newGraph = TinkerGraph.open();
+Graph newGraph = TinkerGraph.open();
 newGraph.io(IoCore.graphson()).readGraph("tinkerpop-modern.json");
 ----
 
@@ -480,14 +480,14 @@ If a custom configuration is required, then have the 
`Graph` generate a `GraphRe
 
 [source,java]
 ----
-final Graph graph = TinkerFactory.createModern();
-try (final OutputStream os = new FileOutputStream("tinkerpop-modern.json")) {
-    final GraphSONMapper mapper = 
graph.io(IoCore.graphson()).mapper().normalize(true).create()
+Graph graph = TinkerFactory.createModern();
+try (OutputStream os = new FileOutputStream("tinkerpop-modern.json")) {
+    GraphSONMapper mapper = 
graph.io(IoCore.graphson()).mapper().normalize(true).create()
     
graph.io(IoCore.graphson()).writer().mapper(mapper).create().writeGraph(os, 
graph)
 }
 
-final Graph newGraph = TinkerGraph.open();
-try (final InputStream stream = new FileInputStream("tinkerpop-modern.json")) {
+Graph newGraph = TinkerGraph.open();
+try (InputStream stream = new FileInputStream("tinkerpop-modern.json")) {
     newGraph.io(IoCore.graphson()).reader().create().readGraph(stream, 
newGraph);
 }
 ----
@@ -814,10 +814,10 @@ Kryo supports all of the `GraphReader` and `GraphWriter` 
interface methods and c
 
 [source,java]
 ----
-final Graph graph = TinkerFactory.createModern();
+Graph graph = TinkerFactory.createModern();
 graph.io(IoCore.gryo()).writeGraph("tinkerpop-modern.kryo");
 
-final Graph newGraph = TinkerGraph.open();
+Graph newGraph = TinkerGraph.open();
 newGraph.io(IoCore.gryo()).readGraph("tinkerpop-modern.kryo");
 ----
 
@@ -825,13 +825,13 @@ If a custom configuration is required, then have the 
`Graph` generate a `GraphRe
 
 [source,java]
 ----
-final Graph graph = TinkerFactory.createModern();
-try (final OutputStream os = new FileOutputStream("tinkerpop-modern.kryo")) {
+Graph graph = TinkerFactory.createModern();
+try (OutputStream os = new FileOutputStream("tinkerpop-modern.kryo")) {
     graph.io(IoCore.gryo()).writer().create().writeGraph(os, graph);
 }
 
-final Graph newGraph = TinkerGraph.open();
-try (final InputStream stream = new FileInputStream("tinkerpop-modern.kryo")) {
+Graph newGraph = TinkerGraph.open();
+try (InputStream stream = new FileInputStream("tinkerpop-modern.kryo")) {
     newGraph.io(IoCore.gryo()).reader().create().readGraph(stream, newGraph);
 }
 ----

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d0d4816/docs/src/reference/the-traversal.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/the-traversal.asciidoc 
b/docs/src/reference/the-traversal.asciidoc
index 0e7fa26..a7f64d5 100644
--- a/docs/src/reference/the-traversal.asciidoc
+++ b/docs/src/reference/the-traversal.asciidoc
@@ -1849,7 +1849,7 @@ mechanics of Gremlin OLAP 
(<<graphcomputer,`GraphComputer`>>).
 ----
 private TraverserSet<Object> haltedTraversers;
 
-public void loadState(final Graph graph, final Configuration configuration) {
+public void loadState(Graph graph, Configuration configuration) {
   VertexProgram.super.loadState(graph, configuration);
   this.traversal = PureTraversal.loadState(configuration, 
VertexProgramStep.ROOT_TRAVERSAL, graph);
   this.programStep = new 
TraversalMatrix<>(this.traversal.get()).getStepById(configuration.getString(ProgramVertexProgramStep.STEP_ID));
@@ -1861,13 +1861,13 @@ public void loadState(final Graph graph, final 
Configuration configuration) {
   this.haltedTraversers = 
TraversalVertexProgram.loadHaltedTraversers(configuration);
 }
 
-public void storeState(final Configuration configuration) {
+public void storeState(Configuration configuration) {
   VertexProgram.super.storeState(configuration);
   // if halted traversers is null or empty, it does nothing
   TraversalVertexProgram.storeHaltedTraversers(configuration, 
this.haltedTraversers);
 }
 
-public void setup(final Memory memory) {
+public void setup(Memory memory) {
   if(!this.haltedTraversers.isEmpty()) {
     // do what you like with the halted master traversal traversers
   }
@@ -1875,7 +1875,7 @@ public void setup(final Memory memory) {
   this.haltedTraversers = null;
 }
 
-public void execute(final Vertex vertex, final Messenger messenger, final 
Memory memory) {
+public void execute(Vertex vertex, Messenger messenger, Memory memory) {
   // once used, no need to keep that information around (workers)
   if(null != this.haltedTraversers)
     this.haltedTraversers = null;
@@ -1895,10 +1895,10 @@ public void execute(final Vertex vertex, final 
Messenger messenger, final Memory
                new 
TraverserSet<>(this.traversal().get().getTraverserGenerator().generate("an 
example", this.programStep, 1l)));
   }
 
-public boolean terminate(final Memory memory) {
+public boolean terminate(Memory memory) {
   // the master-traversal will have halted traversers
   assert memory.exists(TraversalVertexProgram.HALTED_TRAVERSERS);
-  final TraverserSet<String> haltedTraversers = 
memory.get(TraversalVertexProgram.HALTED_TRAVERSERS);
+  TraverserSet<String> haltedTraversers = 
memory.get(TraversalVertexProgram.HALTED_TRAVERSERS);
   // it will only have the traversers sent to the master traversal via memory
   assert haltedTraversers.stream().map(Traverser::get).filter(s -> 
s.equals("an example")).findAny().isPresent();
   // it will not contain the worker traversers distributed throughout the 
vertices
@@ -3059,11 +3059,11 @@ public final class IdentityRemovalStrategy extends 
AbstractTraversalStrategy<Tra
     }
 
     @Override
-    public void apply(final Traversal.Admin<?, ?> traversal) {
+    public void apply(Traversal.Admin<?, ?> traversal) {
         if (traversal.getSteps().size() <= 1)
             return;
 
-        for (final IdentityStep<?> identityStep : 
TraversalHelper.getStepsOfClass(IdentityStep.class, traversal)) {
+        for (IdentityStep<?> identityStep : 
TraversalHelper.getStepsOfClass(IdentityStep.class, traversal)) {
             if (identityStep.getLabels().isEmpty() || 
!(identityStep.getPreviousStep() instanceof EmptyStep)) {
                 TraversalHelper.copyLabels(identityStep, 
identityStep.getPreviousStep(), false);
                 traversal.removeStep(identityStep);
@@ -3110,17 +3110,17 @@ public final class TinkerGraphStepStrategy extends 
AbstractTraversalStrategy<Tra
     }
 
     @Override
-    public void apply(final Traversal.Admin<?, ?> traversal) {
+    public void apply(Traversal.Admin<?, ?> traversal) {
         if (TraversalHelper.onGraphComputer(traversal))
             return;
 
-        for (final GraphStep originalGraphStep : 
TraversalHelper.getStepsOfClass(GraphStep.class, traversal)) {
-            final TinkerGraphStep<?, ?> tinkerGraphStep = new 
TinkerGraphStep<>(originalGraphStep);
+        for (GraphStep originalGraphStep : 
TraversalHelper.getStepsOfClass(GraphStep.class, traversal)) {
+            TinkerGraphStep<?, ?> tinkerGraphStep = new 
TinkerGraphStep<>(originalGraphStep);
             TraversalHelper.replaceStep(originalGraphStep, tinkerGraphStep, 
traversal);
             Step<?, ?> currentStep = tinkerGraphStep.getNextStep();
             while (currentStep instanceof HasStep || currentStep instanceof 
NoOpBarrierStep) {
                 if (currentStep instanceof HasStep) {
-                    for (final HasContainer hasContainer : 
((HasContainerHolder) currentStep).getHasContainers()) {
+                    for (HasContainer hasContainer : ((HasContainerHolder) 
currentStep).getHasContainers()) {
                         if (!GraphStep.processHasContainerIds(tinkerGraphStep, 
hasContainer))
                             tinkerGraphStep.addHasContainer(hasContainer);
                     }
@@ -3494,11 +3494,11 @@ any custom methods required by the DSL:
 ----
 public class SocialTraversalSourceDsl extends GraphTraversalSource {
 
-    public SocialTraversalSourceDsl(final Graph graph, final 
TraversalStrategies traversalStrategies) {
+    public SocialTraversalSourceDsl(Graph graph, TraversalStrategies 
traversalStrategies) {
         super(graph, traversalStrategies);
     }
 
-    public SocialTraversalSourceDsl(final Graph graph) {
+    public SocialTraversalSourceDsl(Graph graph) {
         super(graph);
     }
 

Reply via email to