APCS Java Subset

Package ap.java.util

This is the annotated API for the java.util package for use with Advanced Placement computer science.

See:
          Description

Interface Summary
Iterator This interface provides an abstraction for obtaining elements one at a time from some source, typically a collection like a Set, List, or Map.
List An ordered sequence or collection.
ListIterator For the purposes of the AP subset (AB only) this interface is an Iterator with two additional methods for changing the collection of elements being iterated over.
Map A Map is a collection that stores (key,value) pairs, that is it maps a key to a value.
Set A Set is a collection that contains no duplicates, that is no pair of elements e1 and e2 such that e1.equals(e2).
 

Class Summary
ArrayList Resizable array-like collection that implements the List interface.
HashMap  
HashSet This collection implements the Set interface using a hash table so that add, remove, and contains each execute in constant or O(1) time assuming reasonable distribution of elements by their hashCode values.
LinkedList The LinkedList class is only used in the AB course.
Random This class supports generation of pseudorandom numbers.
TreeMap  
TreeSet This collection implements the Set interface so that add, remove, and contains each execute in O(log n) time for a set of n elements.
 

Exception Summary
NoSuchElementException Students should understand this error/exception when it occurs in a program.
 

Package ap.java.util Description

This is the annotated API for the java.util package for use with Advanced Placement computer science. This is not a substitute for the regular Java API documentation, but is intended to be useful for teachers using the AP Java subset.

The official AP Java subset does not specify a package ap.java.util for use in AP courses. However, a package is used here to make it clear that this documentation is different from the documentation provided as part of the standard Java API and different from what is provided as part of the APCS course description and Java subset.


unofficial documentation for the APCS Java Subset