Update old school @exception with new school @throws.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/branches/COLLECTIONS_3_2_X@1747099 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
876942fc66
commit
7f0185bd3d
|
@ -664,7 +664,7 @@ public class CursorableLinkedList implements List, Serializable {
|
||||||
* be stored, if it is big enough; otherwise, a new array of the
|
* be stored, if it is big enough; otherwise, a new array of the
|
||||||
* same runtime type is allocated for this purpose.
|
* same runtime type is allocated for this purpose.
|
||||||
* @return an array containing the elements of this list.
|
* @return an array containing the elements of this list.
|
||||||
* @exception ArrayStoreException
|
* @throws ArrayStoreException
|
||||||
* if the runtime type of the specified array
|
* if the runtime type of the specified array
|
||||||
* is not a supertype of the runtime type of every element in
|
* is not a supertype of the runtime type of every element in
|
||||||
* this list.
|
* this list.
|
||||||
|
|
|
@ -178,7 +178,7 @@ public class FastArrayList extends ArrayList {
|
||||||
* @param index Index at which to insert this element
|
* @param index Index at which to insert this element
|
||||||
* @param element The element to be inserted
|
* @param element The element to be inserted
|
||||||
*
|
*
|
||||||
* @exception IndexOutOfBoundsException if the index is out of range
|
* @throws IndexOutOfBoundsException if the index is out of range
|
||||||
*/
|
*/
|
||||||
public void add(int index, Object element) {
|
public void add(int index, Object element) {
|
||||||
|
|
||||||
|
@ -230,7 +230,7 @@ public class FastArrayList extends ArrayList {
|
||||||
* @param index Index at which insertion takes place
|
* @param index Index at which insertion takes place
|
||||||
* @param collection The collection to be added
|
* @param collection The collection to be added
|
||||||
*
|
*
|
||||||
* @exception IndexOutOfBoundsException if the index is out of range
|
* @throws IndexOutOfBoundsException if the index is out of range
|
||||||
*/
|
*/
|
||||||
public boolean addAll(int index, Collection collection) {
|
public boolean addAll(int index, Collection collection) {
|
||||||
|
|
||||||
|
@ -254,7 +254,7 @@ public class FastArrayList extends ArrayList {
|
||||||
* Remove all of the elements from this list. The list will be empty
|
* Remove all of the elements from this list. The list will be empty
|
||||||
* after this call returns.
|
* after this call returns.
|
||||||
*
|
*
|
||||||
* @exception UnsupportedOperationException if <code>clear()</code>
|
* @throws UnsupportedOperationException if <code>clear()</code>
|
||||||
* is not supported by this list
|
* is not supported by this list
|
||||||
*/
|
*/
|
||||||
public void clear() {
|
public void clear() {
|
||||||
|
@ -405,7 +405,7 @@ public class FastArrayList extends ArrayList {
|
||||||
*
|
*
|
||||||
* @param index The index of the element to return
|
* @param index The index of the element to return
|
||||||
*
|
*
|
||||||
* @exception IndexOutOfBoundsException if the index is out of range
|
* @throws IndexOutOfBoundsException if the index is out of range
|
||||||
*/
|
*/
|
||||||
public Object get(int index) {
|
public Object get(int index) {
|
||||||
|
|
||||||
|
@ -576,7 +576,7 @@ public class FastArrayList extends ArrayList {
|
||||||
*
|
*
|
||||||
* @param index The starting position of the iterator to return
|
* @param index The starting position of the iterator to return
|
||||||
* @return the list iterator
|
* @return the list iterator
|
||||||
* @exception IndexOutOfBoundsException if the index is out of range
|
* @throws IndexOutOfBoundsException if the index is out of range
|
||||||
*/
|
*/
|
||||||
public ListIterator listIterator(int index) {
|
public ListIterator listIterator(int index) {
|
||||||
if (fast) {
|
if (fast) {
|
||||||
|
@ -593,7 +593,7 @@ public class FastArrayList extends ArrayList {
|
||||||
*
|
*
|
||||||
* @param index Index of the element to be removed
|
* @param index Index of the element to be removed
|
||||||
*
|
*
|
||||||
* @exception IndexOutOfBoundsException if the index is out of range
|
* @throws IndexOutOfBoundsException if the index is out of range
|
||||||
*/
|
*/
|
||||||
public Object remove(int index) {
|
public Object remove(int index) {
|
||||||
|
|
||||||
|
@ -643,7 +643,7 @@ public class FastArrayList extends ArrayList {
|
||||||
*
|
*
|
||||||
* @param collection Collection containing elements to be removed
|
* @param collection Collection containing elements to be removed
|
||||||
*
|
*
|
||||||
* @exception UnsupportedOperationException if this optional operation
|
* @throws UnsupportedOperationException if this optional operation
|
||||||
* is not supported by this list
|
* is not supported by this list
|
||||||
*/
|
*/
|
||||||
public boolean removeAll(Collection collection) {
|
public boolean removeAll(Collection collection) {
|
||||||
|
@ -670,7 +670,7 @@ public class FastArrayList extends ArrayList {
|
||||||
*
|
*
|
||||||
* @param collection Collection containing elements to be retained
|
* @param collection Collection containing elements to be retained
|
||||||
*
|
*
|
||||||
* @exception UnsupportedOperationException if this optional operation
|
* @throws UnsupportedOperationException if this optional operation
|
||||||
* is not supported by this list
|
* is not supported by this list
|
||||||
*/
|
*/
|
||||||
public boolean retainAll(Collection collection) {
|
public boolean retainAll(Collection collection) {
|
||||||
|
@ -702,7 +702,7 @@ public class FastArrayList extends ArrayList {
|
||||||
* @param index Index of the element to replace
|
* @param index Index of the element to replace
|
||||||
* @param element The new element to be stored
|
* @param element The new element to be stored
|
||||||
*
|
*
|
||||||
* @exception IndexOutOfBoundsException if the index is out of range
|
* @throws IndexOutOfBoundsException if the index is out of range
|
||||||
*/
|
*/
|
||||||
public Object set(int index, Object element) {
|
public Object set(int index, Object element) {
|
||||||
|
|
||||||
|
@ -743,7 +743,7 @@ public class FastArrayList extends ArrayList {
|
||||||
* @param fromIndex The starting index of the sublist view
|
* @param fromIndex The starting index of the sublist view
|
||||||
* @param toIndex The index after the end of the sublist view
|
* @param toIndex The index after the end of the sublist view
|
||||||
*
|
*
|
||||||
* @exception IndexOutOfBoundsException if an index is out of range
|
* @throws IndexOutOfBoundsException if an index is out of range
|
||||||
*/
|
*/
|
||||||
public List subList(int fromIndex, int toIndex) {
|
public List subList(int fromIndex, int toIndex) {
|
||||||
if (fast) {
|
if (fast) {
|
||||||
|
@ -780,7 +780,7 @@ public class FastArrayList extends ArrayList {
|
||||||
*
|
*
|
||||||
* @param array Array defining the element type of the returned list
|
* @param array Array defining the element type of the returned list
|
||||||
*
|
*
|
||||||
* @exception ArrayStoreException if the runtime type of <code>array</code>
|
* @throws ArrayStoreException if the runtime type of <code>array</code>
|
||||||
* is not a supertype of the runtime type of every element in this list
|
* is not a supertype of the runtime type of every element in this list
|
||||||
*/
|
*/
|
||||||
public Object[] toArray(Object array[]) {
|
public Object[] toArray(Object array[]) {
|
||||||
|
|
|
@ -168,7 +168,7 @@ public class ComparatorChain implements Comparator, Serializable {
|
||||||
*
|
*
|
||||||
* @param index index of the Comparator to replace
|
* @param index index of the Comparator to replace
|
||||||
* @param comparator Comparator to place at the given index
|
* @param comparator Comparator to place at the given index
|
||||||
* @exception IndexOutOfBoundsException
|
* @throws IndexOutOfBoundsException
|
||||||
* if index < 0 or index >= size()
|
* if index < 0 or index >= size()
|
||||||
*/
|
*/
|
||||||
public void setComparator(int index, Comparator comparator)
|
public void setComparator(int index, Comparator comparator)
|
||||||
|
@ -260,7 +260,7 @@ public class ComparatorChain implements Comparator, Serializable {
|
||||||
* @param o1 the first object to compare
|
* @param o1 the first object to compare
|
||||||
* @param o2 the second object to compare
|
* @param o2 the second object to compare
|
||||||
* @return -1, 0, or 1
|
* @return -1, 0, or 1
|
||||||
* @exception UnsupportedOperationException
|
* @throws UnsupportedOperationException
|
||||||
* if the ComparatorChain does not contain at least one
|
* if the ComparatorChain does not contain at least one
|
||||||
* Comparator
|
* Comparator
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -65,7 +65,7 @@ public class NullComparator implements Comparator, Serializable {
|
||||||
* non-<code>null</code> objects. This argument cannot be
|
* non-<code>null</code> objects. This argument cannot be
|
||||||
* <code>null</code>
|
* <code>null</code>
|
||||||
*
|
*
|
||||||
* @exception NullPointerException if <code>nonNullComparator</code> is
|
* @throws NullPointerException if <code>nonNullComparator</code> is
|
||||||
* <code>null</code>
|
* <code>null</code>
|
||||||
**/
|
**/
|
||||||
public NullComparator(Comparator nonNullComparator) {
|
public NullComparator(Comparator nonNullComparator) {
|
||||||
|
@ -104,7 +104,7 @@ public class NullComparator implements Comparator, Serializable {
|
||||||
* that <code>null</code> should be compared as lower than a
|
* that <code>null</code> should be compared as lower than a
|
||||||
* non-<code>null</code> object.
|
* non-<code>null</code> object.
|
||||||
*
|
*
|
||||||
* @exception NullPointerException if <code>nonNullComparator</code> is
|
* @throws NullPointerException if <code>nonNullComparator</code> is
|
||||||
* <code>null</code>
|
* <code>null</code>
|
||||||
**/
|
**/
|
||||||
public NullComparator(Comparator nonNullComparator, boolean nullsAreHigh) {
|
public NullComparator(Comparator nonNullComparator, boolean nullsAreHigh) {
|
||||||
|
|
|
@ -103,8 +103,8 @@ public class EnumerationIterator implements Iterator {
|
||||||
* If so, the first occurrence of the last returned object from this
|
* If so, the first occurrence of the last returned object from this
|
||||||
* iterator will be removed from the collection.
|
* iterator will be removed from the collection.
|
||||||
*
|
*
|
||||||
* @exception IllegalStateException <code>next()</code> not called.
|
* @throws IllegalStateException <code>next()</code> not called.
|
||||||
* @exception UnsupportedOperationException if no associated collection
|
* @throws UnsupportedOperationException if no associated collection
|
||||||
*/
|
*/
|
||||||
public void remove() {
|
public void remove() {
|
||||||
if (collection != null) {
|
if (collection != null) {
|
||||||
|
|
|
@ -259,7 +259,7 @@ public abstract class AbstractTestObject extends BulkTest {
|
||||||
*
|
*
|
||||||
* @param o Object to serialize
|
* @param o Object to serialize
|
||||||
* @param path path to write the serialized Object
|
* @param path path to write the serialized Object
|
||||||
* @exception IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
protected void writeExternalFormToDisk(Serializable o, String path) throws IOException {
|
protected void writeExternalFormToDisk(Serializable o, String path) throws IOException {
|
||||||
FileOutputStream fileStream = new FileOutputStream(path);
|
FileOutputStream fileStream = new FileOutputStream(path);
|
||||||
|
@ -272,7 +272,7 @@ public abstract class AbstractTestObject extends BulkTest {
|
||||||
*
|
*
|
||||||
* @param o Object to convert to bytes
|
* @param o Object to convert to bytes
|
||||||
* @return serialized form of the Object
|
* @return serialized form of the Object
|
||||||
* @exception IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
protected byte[] writeExternalFormToBytes(Serializable o) throws IOException {
|
protected byte[] writeExternalFormToBytes(Serializable o) throws IOException {
|
||||||
ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
|
ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
|
||||||
|
@ -287,8 +287,8 @@ public abstract class AbstractTestObject extends BulkTest {
|
||||||
*
|
*
|
||||||
* @param path path to the serialized Object
|
* @param path path to the serialized Object
|
||||||
* @return the Object at the given path
|
* @return the Object at the given path
|
||||||
* @exception IOException
|
* @throws IOException
|
||||||
* @exception ClassNotFoundException
|
* @throws ClassNotFoundException
|
||||||
*/
|
*/
|
||||||
protected Object readExternalFormFromDisk(String path) throws IOException, ClassNotFoundException {
|
protected Object readExternalFormFromDisk(String path) throws IOException, ClassNotFoundException {
|
||||||
FileInputStream stream = new FileInputStream(path);
|
FileInputStream stream = new FileInputStream(path);
|
||||||
|
@ -301,8 +301,8 @@ public abstract class AbstractTestObject extends BulkTest {
|
||||||
*
|
*
|
||||||
* @param b byte array containing a serialized Object
|
* @param b byte array containing a serialized Object
|
||||||
* @return Object contained in the bytes
|
* @return Object contained in the bytes
|
||||||
* @exception IOException
|
* @throws IOException
|
||||||
* @exception ClassNotFoundException
|
* @throws ClassNotFoundException
|
||||||
*/
|
*/
|
||||||
protected Object readExternalFormFromBytes(byte[] b) throws IOException, ClassNotFoundException {
|
protected Object readExternalFormFromBytes(byte[] b) throws IOException, ClassNotFoundException {
|
||||||
ByteArrayInputStream stream = new ByteArrayInputStream(b);
|
ByteArrayInputStream stream = new ByteArrayInputStream(b);
|
||||||
|
|
Loading…
Reference in New Issue