package com.tinkerpop.gremlin.structure.strategy;

import com.tinkerpop.gremlin.structure.Graph;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

/**
 * The {@link StrategyContext} object is provided to the methods of {@link GraphStrategy} so that the strategy functions
 * it constructs have some knowledge of the environment.
 *
 * @param <T> represents the object that is calling the strategy (i.e. the vertex on which addEdge was called).
 */
public final class StrategyContext<T extends StrategyWrapped, B> {
    private final StrategyGraph g;
    private final Graph baseGraph;
    private final Map<String, Object> environment;
    private final T current;
    private final B currentBase;

    public StrategyContext(final StrategyGraph g, final T current, final B currentBase) {
        this(g, current, currentBase, null);
    }

    public StrategyContext(final StrategyGraph g, final T current, final B currentBase, final Map<String, Object> environment) {
        if (null == g) throw Graph.Exceptions.argumentCanNotBeNull("g");
        if (null == current) throw Graph.Exceptions.argumentCanNotBeNull("current");
        if (null == currentBase) throw Graph.Exceptions.argumentCanNotBeNull("currentBase");

        this.g = g;
        this.baseGraph = g.getBaseGraphSafe();
        this.current = current;
        this.currentBase = currentBase;
        this.environment = null == environment ? new HashMap<>() : environment;
    }

    public T getCurrent() {
        return current;
    }

    public B getCurrentBase() {
        return currentBase;
    }

    public Graph getBaseGraph() {
        return baseGraph;
    }

    public StrategyGraph getStrategyGraph() {
        return g;
    }

    public Map<String, Object> getEnvironment() {
        return Collections.unmodifiableMap(environment);
    }
}

@@ -399,20 +399,23 @@
 that is 
-call
+trigger
 ing the 
@@ -470,16 +470,89 @@
 alled).%0A
+ * @param %3CB%3E represents the base object that is triggering the strategy%0A
  */%0Apubl
@@ -798,31 +798,24 @@
 tBase;%0A%0A    
-public 
 StrategyCont
@@ -929,39 +929,32 @@
 ll);%0A    %7D%0A%0A    
-public 
 StrategyContext(
@@ -1541,196 +1541,1357 @@
     
-public T getCurrent() %7B%0A        return current;%0A    %7D%0A%0A    public B getCurrentBase() %7B%0A        return currentBase;%0A    %7D%0A%0A    public Graph getBaseGraph() %7B%0A        return baseGraph;%0A    %7D%0A
+/**%0A     * Gets the %7B@link StrategyWrapped%7D instance that is triggering the %7B@link GraphStrategy%7D method.%0A     */%0A    public T getCurrent() %7B%0A        return current;%0A    %7D%0A%0A    /**%0A     * Gets the base object of the %7B@link StrategyWrapped%7D instances that is triggering the %7B@link GraphStrategy%7D%0A     * method.  If a %7B@link GraphStrategy%7D implementation needs this instance, it is better to grab the reference%0A     * from this method than to try to access it via the instance returned from %7B@link #getCurrent%7D as a %22safe%22%0A     * %7B@link StrategyGraph%7D will throw an exception%0A     * (see %7B@link com.tinkerpop.gremlin.structure.strategy.SafeStrategy%7D).%0A     */%0A    public B getCurrentBase() %7B%0A        return currentBase;%0A    %7D%0A%0A    /**%0A     * Gets the base %7B@link Graph%7D of the %7B@link StrategyGraph%7D instance.  If a %7B@link GraphStrategy%7D implementation%0A     * needs this instance, it is better to grab the reference from this method than to try to access it via the%0A     * instance returned from %7B@link #getCurrent%7D as a %22safe%22 %7B@link StrategyGraph%7D will throw an exception%0A     * (see %7B@link com.tinkerpop.gremlin.structure.strategy.SafeStrategy%7D).%0A     */%0A    public Graph getBaseGraph() %7B%0A        return baseGraph;%0A    %7D%0A%0A    /**%0A     * Gets the current %7B@link com.tinkerpop.gremlin.structure.strategy.StrategyGraph%7D instance.%0A     * @return%0A     */
 %0A   

Add javadoc to StrategyContext.