예제 #1
0
 // The fake cast to E is safe because the creation methods only allow E's
 @SuppressWarnings("unchecked")
 @Override
 public UnmodifiableIterator<E> iterator() {
   return (UnmodifiableIterator<E>) Iterators.forArray(array, offset, size);
 }
예제 #2
0
  @SuppressWarnings("unchecked")
  @Override
  public UnmodifiableListIterator<E> listIterator(int index) {

    return (UnmodifiableListIterator<E>) Iterators.forArray(array, offset, size, index);
  }
예제 #3
0
 @SuppressWarnings("unchecked")
 @Override
 public UnmodifiableIterator<E> iterator() {
   return (UnmodifiableIterator<E>) Iterators.forArray(elements);
 }