Coverage Summary for Class: UnmodifiableListIterator (com.google.common.collect)
| Class | Class, % | Method, % | Line, % |
|---|---|---|---|
| UnmodifiableListIterator | 100% (1/1) | 33.3% (1/3) | 33.3% (1/3) |
1 /* 2 * Copyright (C) 2010 The Guava Authors 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.google.common.collect; 18 19 import com.google.common.annotations.GwtCompatible; 20 import com.google.errorprone.annotations.DoNotCall; 21 import java.util.ListIterator; 22 23 /** 24 * A list iterator that does not support {@link #remove}, {@link #add}, or {@link #set}. 25 * 26 * @since 7.0 27 * @author Louis Wasserman 28 */ 29 @GwtCompatible 30 public abstract class UnmodifiableListIterator<E> extends UnmodifiableIterator<E> 31 implements ListIterator<E> { 32 /** Constructor for use by subclasses. */ 33 protected UnmodifiableListIterator() {} 34 35 /** 36 * Guaranteed to throw an exception and leave the underlying data unmodified. 37 * 38 * @throws UnsupportedOperationException always 39 * @deprecated Unsupported operation. 40 */ 41 @Deprecated 42 @Override 43 @DoNotCall("Always throws UnsupportedOperationException") 44 public final void add(E e) { 45 throw new UnsupportedOperationException(); 46 } 47 48 /** 49 * Guaranteed to throw an exception and leave the underlying data unmodified. 50 * 51 * @throws UnsupportedOperationException always 52 * @deprecated Unsupported operation. 53 */ 54 @Deprecated 55 @Override 56 @DoNotCall("Always throws UnsupportedOperationException") 57 public final void set(E e) { 58 throw new UnsupportedOperationException(); 59 } 60 }