@Override
    public void configure(final Object... keyValues) {
        if (keyValues[0].equals(WithOptions.tokens)) {
            if (keyValues.length == 2 && keyValues[1] instanceof Boolean) {
                this.tokens = ((boolean) keyValues[1]) ? WithOptions.all : WithOptions.none;
            } else {
                for (int i = 1; i < keyValues.length; i++) {
                    if (!(keyValues[i] instanceof Integer))
                        throw new IllegalArgumentException("WithOptions.tokens requires Integer arguments (possible " + "" +
                                "values are: WithOptions.[none|ids|labels|keys|values|all])");
                    this.tokens |= (int) keyValues[i];
                }
            }
        } else {
            this.parameters.set(this, keyValues);
        }
    }
@author Marko A. Rodriguez (http://markorodriguez.com)
@author Daniel Kuppitz (http://gremlin.guru)
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PropertyMapStep.java