// Path: gremlin-objects/src/main/java/org/apache/tinkerpop/gremlin/object/traversal/ElementTo.java
// @FunctionalInterface
// public interface ElementTo<O> extends SubTraversal<Element, O> {
// 
//   /**
//    * A function denoting a {@code GraphTraversal} that starts at elements, and ends at elements.
//    */
//   @FunctionalInterface
//   interface Element extends SubTraversal<
//       org.apache.tinkerpop.gremlin.structure.Element,
//       org.apache.tinkerpop.gremlin.structure.Element> {
// 
//   }
// 
//   /**
//    * A function denoting a {@code GraphTraversal} that starts at elements, and ends at vertices.
//    */
//   @FunctionalInterface
//   interface Vertex extends SubTraversal<
//       org.apache.tinkerpop.gremlin.structure.Element,
//       org.apache.tinkerpop.gremlin.structure.Vertex> {
// 
//   }
// 
//   /**
//    * A function denoting a {@code GraphTraversal} that starts at elements, and ends at strings.
//    */
//   @FunctionalInterface
//   interface String extends SubTraversal<
//       org.apache.tinkerpop.gremlin.structure.Element,
//       java.lang.String> {
// 
//   }
// 
//   /**
//    * A function denoting a {@code GraphTraversal} that starts at elements, and ends at longs.
//    */
//   @FunctionalInterface
//   interface Long extends SubTraversal<
//       org.apache.tinkerpop.gremlin.structure.Element,
//       java.lang.Long> {
// 
//   }
// 
//   /**
//    * A function denoting a {@code GraphTraversal} that starts at elements, and ends anywhere.
//    */
//   @FunctionalInterface
//   @SuppressWarnings("PMD.ShortClassName")
//   interface Any extends SubTraversal<
//       org.apache.tinkerpop.gremlin.structure.Element,
//       java.lang.Object> {
// 
//   }
// 
//   /**
//    * A function denoting a {@code GraphTraversal} that starts at elements, and ends in maps.
//    */
//   @FunctionalInterface
//   @SuppressWarnings("PMD.ShortClassName")
//   interface Map extends SubTraversal<
//       org.apache.tinkerpop.gremlin.structure.Element,
//       java.util.Map<java.lang.String, java.lang.Object>> {
//   }
// }


import org.apache.tinkerpop.gremlin.object.traversal.ElementTo;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
import org.apache.tinkerpop.gremlin.structure.Element;
import lombok.Data;
import lombok.RequiredArgsConstructor;
import lombok.experimental.Accessors;
/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements. See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership. The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License. You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied. See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
package org.apache.tinkerpop.gremlin.object.traversal.library;



/**
 * {@link Range} limits the count of the traversal such that it falls between the given {@link #low}
 * and {@link #high} numbers.
 *
 * @author Karthick Sankarachary (http://github.com/karthicks)
 */
@Data
@Accessors(fluent = true, chain = true)
@RequiredArgsConstructor(staticName = "of")
public class Range implements ElementTo.Element {

  private final int low;
  private final int high;

  @Override
// Path: gremlin-objects/src/main/java/org/apache/tinkerpop/gremlin/object/traversal/ElementTo.java
// @FunctionalInterface
// public interface ElementTo<O> extends SubTraversal<Element, O> {
// 
//   /**
//    * A function denoting a {@code GraphTraversal} that starts at elements, and ends at elements.
//    */
//   @FunctionalInterface
//   interface Element extends SubTraversal<
//       org.apache.tinkerpop.gremlin.structure.Element,
//       org.apache.tinkerpop.gremlin.structure.Element> {
// 
//   }
// 
//   /**
//    * A function denoting a {@code GraphTraversal} that starts at elements, and ends at vertices.
//    */
//   @FunctionalInterface
//   interface Vertex extends SubTraversal<
//       org.apache.tinkerpop.gremlin.structure.Element,
//       org.apache.tinkerpop.gremlin.structure.Vertex> {
// 
//   }
// 
//   /**
//    * A function denoting a {@code GraphTraversal} that starts at elements, and ends at strings.
//    */
//   @FunctionalInterface
//   interface String extends SubTraversal<
//       org.apache.tinkerpop.gremlin.structure.Element,
//       java.lang.String> {
// 
//   }
// 
//   /**
//    * A function denoting a {@code GraphTraversal} that starts at elements, and ends at longs.
//    */
//   @FunctionalInterface
//   interface Long extends SubTraversal<
//       org.apache.tinkerpop.gremlin.structure.Element,
//       java.lang.Long> {
// 
//   }
// 
//   /**
//    * A function denoting a {@code GraphTraversal} that starts at elements, and ends anywhere.
//    */
//   @FunctionalInterface
//   @SuppressWarnings("PMD.ShortClassName")
//   interface Any extends SubTraversal<
//       org.apache.tinkerpop.gremlin.structure.Element,
//       java.lang.Object> {
// 
//   }
// 
//   /**
//    * A function denoting a {@code GraphTraversal} that starts at elements, and ends in maps.
//    */
//   @FunctionalInterface
//   @SuppressWarnings("PMD.ShortClassName")
//   interface Map extends SubTraversal<
//       org.apache.tinkerpop.gremlin.structure.Element,
//       java.util.Map<java.lang.String, java.lang.Object>> {
//   }
// }


// Path: gremlin-objects/src/main/java/org/apache/tinkerpop/gremlin/object/traversal/library/Range.java
import org.apache.tinkerpop.gremlin.object.traversal.ElementTo;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
import org.apache.tinkerpop.gremlin.structure.Element;
import lombok.Data;
import lombok.RequiredArgsConstructor;
import lombok.experimental.Accessors;

/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements. See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership. The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License. You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied. See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
package org.apache.tinkerpop.gremlin.object.traversal.library;



/**
 * {@link Range} limits the count of the traversal such that it falls between the given {@link #low}
 * and {@link #high} numbers.
 *
 * @author Karthick Sankarachary (http://github.com/karthicks)
 */
@Data
@Accessors(fluent = true, chain = true)
@RequiredArgsConstructor(staticName = "of")
public class Range implements ElementTo.Element {

  private final int low;
  private final int high;

  @Override
  public GraphTraversal<Element, Element> apply(GraphTraversal<Element, Element> traversal) {