You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by ok...@apache.org on 2015/03/09 22:26:40 UTC
[2/3] incubator-tinkerpop git commit: Remove groovy specific version
of ArrayIterator.
Remove groovy specific version of ArrayIterator.
This class was already implemented in gremlin-core - didn't need both.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/d06a179d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/d06a179d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/d06a179d
Branch: refs/heads/newapi
Commit: d06a179db2264de2313a1ecf57526b41aef7afcc
Parents: 3ae30a4
Author: Stephen Mallette <sp...@apache.org>
Authored: Mon Mar 9 14:23:39 2015 -0400
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Mon Mar 9 15:26:33 2015 -0600
----------------------------------------------------------------------
.../tinkerpop/gremlin/console/Console.groovy | 2 +-
.../gremlin/console/util/ArrayIterator.groovy | 49 --------------------
2 files changed, 1 insertion(+), 50 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/d06a179d/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
index efdabf5..db50891 100644
--- a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
+++ b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
@@ -20,10 +20,10 @@ package org.apache.tinkerpop.gremlin.console
import org.apache.tinkerpop.gremlin.console.commands.*
import org.apache.tinkerpop.gremlin.console.plugin.PluggedIn
-import org.apache.tinkerpop.gremlin.console.util.ArrayIterator
import org.apache.tinkerpop.gremlin.groovy.loaders.GremlinLoader
import org.apache.tinkerpop.gremlin.groovy.plugin.GremlinPlugin
import jline.console.history.FileHistory
+import org.apache.tinkerpop.gremlin.util.iterator.ArrayIterator
import org.codehaus.groovy.tools.shell.ExitNotification
import org.codehaus.groovy.tools.shell.Groovysh
import org.codehaus.groovy.tools.shell.IO
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/d06a179d/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/util/ArrayIterator.groovy
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/util/ArrayIterator.groovy b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/util/ArrayIterator.groovy
deleted file mode 100644
index b6503ef..0000000
--- a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/util/ArrayIterator.groovy
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * 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.console.util
-
-import org.apache.tinkerpop.gremlin.process.FastNoSuchElementException
-
-/**
- * @author Stephen Mallette (http://stephen.genoprime.com)
- */
-class ArrayIterator implements Iterator {
-
- private final Object[] array
- private int count = 0
-
- public ArrayIterator(final Object[] array) {
- this.array = array
- }
-
- public void remove() {
- throw new UnsupportedOperationException()
- }
-
- public Object next() {
- if (count > array.length)
- throw FastNoSuchElementException.instance()
-
- return array[count++]
- }
-
- public boolean hasNext() {
- return count < array.length
- }
-}