/*
 * 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.olingo.commons.api.data;

import org.apache.olingo.commons.api.ex.ODataNotSupportedException;

import java.net.URI;
import java.util.Iterator;

/**
 * Data representation as an Iterator for a collection of single entities.
 */
public abstract class EntityIterator extends AbstractEntityCollection implements Iterator<Entity> {

  /**
   * {@inheritDoc}
   */
  public abstract boolean hasNext();
  /**
   * {@inheritDoc}
   * <p/>
   * Which is an Entity for this type of iterator.
   */
  public abstract Entity next();

  /**
   * {@inheritDoc}
   * <p/>
   * <b>ATTENTION:</b> <code>remove</code> is not supported by default.
   */
  @Override
  public void remove() {
    //"Remove is not supported for iteration over Entities."
    throw new ODataNotSupportedException("Entity Iterator does not support remove()");
  }

  /**
   * {@inheritDoc}
   */
  @Override
  public Iterator<Entity> iterator() {
    return this;
  }

  /**
   * {@inheritDoc}
   * <p/>
   * <b>ATTENTION:</b> <code>getCount</code> is not supported by default.
   */
  public Integer getCount() {
    throw new ODataNotSupportedException("Entity Iterator does not support getCount()");
  }

  /**
   * {@inheritDoc}
   * <p/>
   * <b>ATTENTION:</b> <code>getNext</code> is not supported by default.
   */
  public URI getNext() {
    throw new ODataNotSupportedException("Entity Iterator does not support getNext()");
  }

  /**
   * {@inheritDoc}
   * <p/>
   * <b>ATTENTION:</b> <code>getDeltaLink</code> is not supported by default.
   */
  public URI getDeltaLink() {
    throw new ODataNotSupportedException("Entity Iterator does not support getDeltaLink()");
  }
}

@@ -956,16 +956,39 @@
 terator;
+%0Aimport java.util.List;
 %0A%0A/**%0A *
@@ -1654,32 +1654,378 @@
 emove()%22);%0A  %7D%0A%0A
+  /**%0A   * %7B@inheritDoc%7D%0A   * %3Cp/%3E%0A   * %3Cb%3EATTENTION:%3C/b%3E %3Ccode%3EgetOperations%3C/code%3E is not supported by default.%0A   */%0A  @Override%0A  public List%3COperation%3E getOperations() %7B%0A    //%22Remove is not supported for iteration over Entities.%22%0A    throw new ODataNotSupportedException(%22Entity Iterator does not support getOperations() by default%22);%0A  %7D%0A%0A
   /**%0A   * %7B@inh

Add default getOperations() for EntityIterator