ms.java 1.32 KB
import com.google.common.annotations.GwtCompatible;
import com.google.common.base.Preconditions;
import com.google.common.collect.UnmodifiableListIterator;
import java.util.NoSuchElementException;

@GwtCompatible
public abstract class ms<E>
  extends UnmodifiableListIterator<E>
{
  private final int a;
  private int b;
  
  protected ms(int paramInt)
  {
    this(paramInt, 0);
  }
  
  protected ms(int paramInt1, int paramInt2)
  {
    Preconditions.checkPositionIndex(paramInt2, paramInt1);
    this.a = paramInt1;
    this.b = paramInt2;
  }
  
  public abstract E a(int paramInt);
  
  public final boolean hasNext()
  {
    return this.b < this.a;
  }
  
  public final boolean hasPrevious()
  {
    return this.b > 0;
  }
  
  public final E next()
  {
    if (!hasNext()) {
      throw new NoSuchElementException();
    }
    int i = this.b;
    this.b = (i + 1);
    return (E)a(i);
  }
  
  public final int nextIndex()
  {
    return this.b;
  }
  
  public final E previous()
  {
    if (!hasPrevious()) {
      throw new NoSuchElementException();
    }
    int i = this.b - 1;
    this.b = i;
    return (E)a(i);
  }
  
  public final int previousIndex()
  {
    return this.b - 1;
  }
}


/* Location:              /home/merong/decompile/hackery-dex2jar.jar!/ms.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */