public static <T> boolean replaceAll (List<T> list, T oldVal, T newVal)

Replaces all occurrences of one specified value in a list with another. More formally, replaces with newVal each element e in list such that (oldVal==null ? e==null : oldVal.equals(e)). (This method has no effect on the size of the list.)

Parameters:
<T>    the class of the objects in the list
list    the list in which replacement is to occur.
oldVal    the old value to be replaced.
newVal    the new value with which oldVal is to be replaced.

Returns:  true if list contained one or more elements e such that (oldVal==null ? e==null : oldVal.equals(e)).

Exceptions:
UnsupportedOperationException    if the specified list or its list-iterator does not support the set operation.

Since:  1.4