incubator-giraph-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clau...@apache.org
Subject svn commit: r1235026 - /incubator/giraph/trunk/src/main/java/org/apache/giraph/utils/EmptyIterable.java
Date Mon, 23 Jan 2012 22:08:49 GMT
Author: claudio
Date: Mon Jan 23 22:08:48 2012
New Revision: 1235026

URL: http://svn.apache.org/viewvc?rev=1235026&view=rev
Log:
missing EmptyIterable.java from GIRAPH-124

Added:
    incubator/giraph/trunk/src/main/java/org/apache/giraph/utils/EmptyIterable.java

Added: incubator/giraph/trunk/src/main/java/org/apache/giraph/utils/EmptyIterable.java
URL: http://svn.apache.org/viewvc/incubator/giraph/trunk/src/main/java/org/apache/giraph/utils/EmptyIterable.java?rev=1235026&view=auto
==============================================================================
--- incubator/giraph/trunk/src/main/java/org/apache/giraph/utils/EmptyIterable.java (added)
+++ incubator/giraph/trunk/src/main/java/org/apache/giraph/utils/EmptyIterable.java Mon Jan
23 22:08:48 2012
@@ -0,0 +1,45 @@
+/*
+ * 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.giraph.utils;
+
+import java.util.Iterator;
+
+public class EmptyIterable<M> implements Iterable<M>, Iterator<M> {
+
+    @Override
+    public Iterator<M> iterator() {
+        return this;
+    }
+
+    @Override
+    public boolean hasNext() {
+        return false;
+    }
+
+    @Override
+    public M next() {
+        return null;
+    }
+
+    @Override
+    public void remove() {
+        throw new UnsupportedOperationException();
+    }
+}
+



Mime
View raw message