@Override
    public int loops(final String loopName) {
        if (loopName == null || this.loopName.equals(loopName))
            return this.loops;
        else
            throw new IllegalArgumentException("Loop name not defined: " + loopName);
    }
@author Marko A. Rodriguez (http://markorodriguez.com)
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/traverser/O_OB_S_SE_SL_Traverser.java