Flashcards in Collections Utility Class Deck (11):
Looks for the key in List. If found, returns a value >= 0; otherwise returns a negative value. It has an overloaded version that also takes a comparator object.
int binarySearch(List, key)
Copies all elements from src List to dst List.
void copy(dest, src)
Fills the whole List with the value obj.
void fill(List, obj)
Returns the max element in the list. Has an overloaded version that takes a comparator.
Returns the min element in the list. Has an overloaded version that takes a comparator.
Replaces all occurences of oldVal with newVal in the list.
boolean replaceAll(List, oldVal, newVal)
Reverses all the elements in the given list.
Rotates the list given by the value distance.
void rotate(List, int distance)
Shuffles the elements in the list randomly.
Sorts the list in its natural order. Has an overloaded version that also takes a comparator object.