APCS Java Subset
A C D E G H I K L M N O P Q R S T

A

ArithmeticException - exception ap.java.lang.ArithmeticException.
An object of this class is thrown when an exceptional arithmetic condition has occurred.
ArithmeticException() - Constructor for class ap.java.lang.ArithmeticException
 
ArrayIndexOutOfBoundsException - exception ap.java.lang.ArrayIndexOutOfBoundsException.
Students should understand this error/exception when it occurs in a program.
ArrayIndexOutOfBoundsException() - Constructor for class ap.java.lang.ArrayIndexOutOfBoundsException
 
ArrayList - class ap.java.util.ArrayList.
Resizable array-like collection that implements the List interface.
ArrayList() - Constructor for class ap.java.util.ArrayList
Constructs an empty ArrayList.
ArrayPriorityQueue - class ap.ArrayPriorityQueue.
A simple yet completely functional implementation of the PriorityQueue interface.
ArrayPriorityQueue() - Constructor for class ap.ArrayPriorityQueue
Constructs an initially empty priority queue.
ArrayStack - class ap.ArrayStack.
A simple yet completely functional implementation of the Stack interface.
ArrayStack() - Constructor for class ap.ArrayStack
Construct an initially empty stack.
abs(int) - Static method in class ap.java.lang.Math
Returns the absolute value of an int value.
abs(double) - Static method in class ap.java.lang.Math
Returns the absolute value of a double value.
add(Object) - Method in class ap.ArrayPriorityQueue
 
add(Object) - Method in class ap.HeapPriorityQueue
 
add(Object) - Method in interface ap.PriorityQueue
Adds an item to this priority queue.
add(Object) - Method in class ap.java.util.ArrayList
Append (adds) the argument to the end of this ArrayList.
add(int, Object) - Method in class ap.java.util.ArrayList
Inserts the argument at the specified position in this list.
add(Object) - Method in class ap.java.util.HashSet
 
add(Object) - Method in class ap.java.util.LinkedList
 
add(Object) - Method in interface ap.java.util.List
Append (adds) the argument to the end of this list.
add(Object) - Method in interface ap.java.util.ListIterator
Inserts the argument into the list being iterated over.
add(Object) - Method in interface ap.java.util.Set
Adds the parameter as an element to this set if it is not already stored in this set.
add(Object) - Method in class ap.java.util.TreeSet
Adds the parameter as an element to this set if it is not already stored in this set.
addFirst(Object) - Method in class ap.java.util.LinkedList
Inserts the argument as the first element of this list.
addLast(Object) - Method in class ap.java.util.LinkedList
Inserts the argument as the last element of this list (note this is the same as the add method, but is included for symmetry and consistency with addFirst).
ap - package ap
This is the annotated AP Computer Science Java Subset; and this is the top-level package ap containing AP interfaces and classes (those not part of the Java distribution).
ap.java.lang - package ap.java.lang
This is the annotated API for the java.lang package for use with Advanced Placement computer science.
ap.java.util - package ap.java.util
This is the annotated API for the java.util package for use with Advanced Placement computer science.

C

ClassCastException - exception ap.java.lang.ClassCastException.
Students should understand this error/exception when it occurs in a program.
ClassCastException() - Constructor for class ap.java.lang.ClassCastException
 
Comparable - interface ap.java.lang.Comparable.
 
compareTo(Object) - Method in interface ap.java.lang.Comparable
 
compareTo(Object) - Method in class ap.java.lang.Double
Compares two Double objects and returns a value consistent with the contract of Comparable.compareTo and with the value returned by Double.equals.
compareTo(Object) - Method in class ap.java.lang.Integer
Compares two Integer objects and returns a value consistent with the contract of Comparable.compareTo and with the value returned by Integer.equals.
compareTo(Object) - Method in class ap.java.lang.String
Compares two strings lexicographically.
contains(Object) - Method in class ap.java.util.HashSet
 
contains(Object) - Method in interface ap.java.util.Set
Returns true if this set contains the element passed as an argument, otherwise returns false.
contains(Object) - Method in class ap.java.util.TreeSet
Returns true if this set contains the element passed as an argument, otherwise returns false.
containsKey(Object) - Method in class ap.java.util.HashMap
 
containsKey(Object) - Method in interface ap.java.util.Map
Returns true if there is a value associated with key in this map, otherwise returns false.
containsKey(Object) - Method in class ap.java.util.TreeMap
 

D

Double - class ap.java.lang.Double.
The class Double is an immutable wrapper class for the primitive type double, allowing primitive values in some contexts to be treated as objects.
Double(double) - Constructor for class ap.java.lang.Double
Constructs an immutable Double wrapping value.
dequeue() - Method in class ap.ListQueue
 
dequeue() - Method in interface ap.Queue
Dequeues and returns the first element of the queue.
doubleValue() - Method in class ap.java.lang.Double
Returns the value represented by this object.

E

enqueue(Object) - Method in class ap.ListQueue
 
enqueue(Object) - Method in interface ap.Queue
Enqueue an element onto the back of this queue.
equals(Object) - Method in class ap.java.lang.Double
Determines if this Double object is equal to another.
equals(Object) - Method in class ap.java.lang.Integer
Determines if this Integer object is equal to another.
equals(Object) - Method in class ap.java.lang.Object
Understanding how to implement equals is not part of the AP Java subset.
equals(Object) - Method in class ap.java.lang.String
Returns true if and only if this String represents the same character sequence as the argument string.

G

get(int) - Method in class ap.java.util.ArrayList
Returns the element at the specified position in this list.
get(Object) - Method in class ap.java.util.HashMap
 
get(int) - Method in class ap.java.util.LinkedList
Returns the element at the specified position in this list.
get(int) - Method in interface ap.java.util.List
Returns the element at the specified position in this list.
get(Object) - Method in interface ap.java.util.Map
Return the value associated with key in this map, or null if there is no value associated wit key.
get(Object) - Method in class ap.java.util.TreeMap
 
getFirst() - Method in class ap.java.util.LinkedList
Returns the first element of this list.
getLast() - Method in class ap.java.util.LinkedList
Returns the last element of this list.
getLeft() - Method in class ap.TreeNode
Returns the left subtree of this node.
getNext() - Method in class ap.ListNode
Returns the next node after this node.
getRight() - Method in class ap.TreeNode
Returns the right subtree of this node.
getValue() - Method in class ap.ListNode
Returns the value stored in this node.
getValue() - Method in class ap.TreeNode
Returns the value stored in this tree node.

H

HashMap - class ap.java.util.HashMap.
 
HashMap() - Constructor for class ap.java.util.HashMap
 
HashSet - class ap.java.util.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.
HashSet() - Constructor for class ap.java.util.HashSet
Construct an initially empty set with the default capacity and load factor.
HeapPriorityQueue - class ap.HeapPriorityQueue.
This class implements the PriorityQueue interface using a binary heap.
HeapPriorityQueue() - Constructor for class ap.HeapPriorityQueue
Constructs an empty priority queue.
hasNext() - Method in interface ap.java.util.Iterator
Returns true if the iteration has more elements.
hashCode() - Method in class ap.java.lang.Object
Understanding how to implement hashCode is not part of the AP Java subset.

I

IllegalArgumentException - exception ap.java.lang.IllegalArgumentException.
Students should understand this error/exception when it occurs in a program.
IllegalArgumentException() - Constructor for class ap.java.lang.IllegalArgumentException
 
IllegalStateException - exception ap.java.lang.IllegalStateException.
Students should understand this error/exception when it occurs in a program.
IllegalStateException() - Constructor for class ap.java.lang.IllegalStateException
 
Integer - class ap.java.lang.Integer.
The class Integer is an immutable wrapper class for the primitive type int, allowing primitive values in some contexts to be treated as objects.
Integer(int) - Constructor for class ap.java.lang.Integer
Constructs an immutable Integer wrapping value.
Iterator - interface ap.java.util.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.
indexOf(String) - Method in class ap.java.lang.String
Returns the index within this String of the first occurrence of s.
intValue() - Method in class ap.java.lang.Integer
Returns the value represented by this object.
isEmpty() - Method in class ap.ArrayPriorityQueue
 
isEmpty() - Method in class ap.ArrayStack
 
isEmpty() - Method in class ap.HeapPriorityQueue
 
isEmpty() - Method in class ap.ListQueue
 
isEmpty() - Method in interface ap.PriorityQueue
Returns true if this stack is empty, otherwise returns false.
isEmpty() - Method in interface ap.Queue
Returns true if this queue is empty, otherwise returns false.
isEmpty() - Method in interface ap.Stack
Returns true if this stack is empty, otherwise returns false.
iterator() - Method in class ap.java.util.ArrayList
Returns an iterator over the elements in this list (AB only).
iterator() - Method in class ap.java.util.HashSet
Returns an Iterator that provides access to the the elements of this set.
iterator() - Method in class ap.java.util.LinkedList
 
iterator() - Method in interface ap.java.util.List
Returns an iterator over the elements in this list.
iterator() - Method in interface ap.java.util.Set
Returns an Iterator that provides access to the the elements of this set.
iterator() - Method in class ap.java.util.TreeSet
Returns an Iterator that provides access to the the elements of this set.

K

keySet() - Method in class ap.java.util.HashMap
 
keySet() - Method in interface ap.java.util.Map
Returns a Set of the keys in the maps.
keySet() - Method in class ap.java.util.TreeMap
 

L

LinkedList - class ap.java.util.LinkedList.
The LinkedList class is only used in the AB course.
LinkedList() - Constructor for class ap.java.util.LinkedList
 
List - interface ap.java.util.List.
An ordered sequence or collection.
ListIterator - interface ap.java.util.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.
ListNode - class ap.ListNode.
The class for linked list nodes that will be used and tested on the Advanced Placement Computer Science exam.
ListNode(Object, ListNode) - Constructor for class ap.ListNode
Construct a list node with specified value and next node.
ListQueue - class ap.ListQueue.
A simple yet completely functional implementation of the Queue interface.
ListQueue() - Constructor for class ap.ListQueue
Constructs an initially empty queue.
length() - Method in class ap.java.lang.String
Returns the number of (Unicode) characters in this string.
listIterator() - Method in class ap.java.util.ArrayList
Returns a list iterator over the elements in this list (AB only).
listIterator() - Method in class ap.java.util.LinkedList
 
listIterator() - Method in interface ap.java.util.List
Returns a list iterator over the elements in this list.

M

Map - interface ap.java.util.Map.
A Map is a collection that stores (key,value) pairs, that is it maps a key to a value.
Math - class ap.java.lang.Math.
The Math class contains static methods for performing basic numeric operations like square root, exponentiation, logarithm, and so on.
Math() - Constructor for class ap.java.lang.Math
 

N

NoSuchElementException - exception ap.java.util.NoSuchElementException.
Students should understand this error/exception when it occurs in a program.
NoSuchElementException() - Constructor for class ap.java.util.NoSuchElementException
 
NullPointerException - exception ap.java.lang.NullPointerException.
Students should understand this error/exception when it occurs in a program.
NullPointerException() - Constructor for class ap.java.lang.NullPointerException
 
next() - Method in interface ap.java.util.Iterator
Returns the next element in this iteration.
nextDouble() - Method in class ap.java.util.Random
Returns a uniformly distributed double.
nextInt(int) - Method in class ap.java.util.Random
Returns a uniformly distributed pseudorandom integer.

O

Object - class ap.java.lang.Object.
The class Object as viewed from the perspective of the Advanced Placement Computer Science Java subset.
Object() - Constructor for class ap.java.lang.Object
 
out - Static variable in class ap.java.lang.System
 

P

PriorityQueue - interface ap.PriorityQueue.
The interface for priority queues as they will be used on the Advanced Placement Computer Science exam.
peekFront() - Method in class ap.ListQueue
 
peekFront() - Method in interface ap.Queue
Returns the first element of the queue without dequeuing it.
peekMin() - Method in class ap.ArrayPriorityQueue
 
peekMin() - Method in class ap.HeapPriorityQueue
 
peekMin() - Method in interface ap.PriorityQueue
Returns the smallest item stored in this priority queue without removing it.
peekTop() - Method in class ap.ArrayStack
 
peekTop() - Method in interface ap.Stack
Returns the top element of the stack without popping it.
pop() - Method in class ap.ArrayStack
 
pop() - Method in interface ap.Stack
Pops and returns the top element of the stack.
pow(double, double) - Static method in class ap.java.lang.Math
Returns the value of baseexponent.
push(Object) - Method in class ap.ArrayStack
 
push(Object) - Method in interface ap.Stack
Push an element onto the top of this stack.
put(Object, Object) - Method in class ap.java.util.HashMap
 
put(Object, Object) - Method in interface ap.java.util.Map
Associates value with key in this map so that get(key) returns value.
put(Object, Object) - Method in class ap.java.util.TreeMap
 

Q

Queue - interface ap.Queue.
The interface for queues as they will be used on the Advanced Placement Computer Science exam.

R

Random - class ap.java.util.Random.
This class supports generation of pseudorandom numbers.
Random() - Constructor for class ap.java.util.Random
Constructs a pseudorandom number generator using the current time as the seed (as returned by System.currentTimeMillis().
remove(int) - Method in class ap.java.util.ArrayList
Removes the element at the specified position from this list.
remove(Object) - Method in class ap.java.util.HashMap
 
remove(Object) - Method in class ap.java.util.HashSet
 
remove() - Method in interface ap.java.util.Iterator
Removes the last element returned by this iterator (by calling next) from the collection being iterated over.
remove(Object) - Method in interface ap.java.util.Map
Removes the mapping for this key from the map and returns the value previously associated with the key in the map.
remove(Object) - Method in interface ap.java.util.Set
Removes the argument from this set and returns true if the argument is in this set; if not present returns false.
remove(Object) - Method in class ap.java.util.TreeMap
 
remove(Object) - Method in class ap.java.util.TreeSet
Removes the argument from this set and returns true if the argument is in this set; if not present returns false.
removeFirst() - Method in class ap.java.util.LinkedList
Removes and returns the first element of this list.
removeLast() - Method in class ap.java.util.LinkedList
Removes and returns the last element of this list.
removeMin() - Method in class ap.ArrayPriorityQueue
 
removeMin() - Method in class ap.HeapPriorityQueue
 
removeMin() - Method in interface ap.PriorityQueue
Removes and returns the smallest item stored in this priority queue.

S

Set - interface ap.java.util.Set.
A Set is a collection that contains no duplicates, that is no pair of elements e1 and e2 such that e1.equals(e2).
Stack - interface ap.Stack.
The interface for stacks as they will be used on the Advanced Placement Computer Science exam.
String - class ap.java.lang.String.
The class String represents a character string.
String() - Constructor for class ap.java.lang.String
Constructs a new string of no characters, that is whose length() method returns 0.
String(String) - Constructor for class ap.java.lang.String
Construct a new string that has the same character sequence as s.
System - class ap.java.lang.System.
This class supplies System.out for the APCS Java subset.
set(int, Object) - Method in class ap.java.util.ArrayList
Replaces the element at the specified position in this list with the specified object.
set(int, Object) - Method in class ap.java.util.LinkedList
Replaces the element at the specified position in this list with the specified object.
set(int, Object) - Method in interface ap.java.util.List
Replaces the element at the specified position in this list with the specified object.
set(Object) - Method in interface ap.java.util.ListIterator
Replaces the last element returned by next by the argument.
setLeft(TreeNode) - Method in class ap.TreeNode
Sets the value of the left subtree of this node.
setNext(ListNode) - Method in class ap.ListNode
Sets the next node after this node
setRight(TreeNode) - Method in class ap.TreeNode
Sets the value of the right subtree of this node.
setValue(Object) - Method in class ap.ListNode
Sets the value stored in this node.
setValue(Object) - Method in class ap.TreeNode
Sets the value of this tree node.
size() - Method in class ap.java.util.ArrayList
Returns the number of elements in this list.
size() - Method in class ap.java.util.HashMap
 
size() - Method in class ap.java.util.HashSet
 
size() - Method in class ap.java.util.LinkedList
 
size() - Method in interface ap.java.util.List
 
size() - Method in interface ap.java.util.Map
Return the number of keys in this map, which is the same as the number of (key,value) pairs.
size() - Method in interface ap.java.util.Set
Returns the number of elements in this set.
size() - Method in class ap.java.util.TreeMap
 
size() - Method in class ap.java.util.TreeSet
 
sqrt(double) - Static method in class ap.java.lang.Math
Returns the square root of a number.
substring(int, int) - Method in class ap.java.lang.String
Returns a new String consisting of the characters with indexes in the range [from..to) from this String object.
substring(int) - Method in class ap.java.lang.String
Returns a new String that is a substring of this String.

T

TreeMap - class ap.java.util.TreeMap.
 
TreeMap() - Constructor for class ap.java.util.TreeMap
 
TreeNode - class ap.TreeNode.
The class for nodes in a binary tree that will be used and tested on the Advanced Placement Computer Science exam.
TreeNode(Object) - Constructor for class ap.TreeNode
Construct a tree node with specified value, with null left and right subtrees.
TreeNode(Object, TreeNode, TreeNode) - Constructor for class ap.TreeNode
Construct a tree node with specified value, left, and right subtrees.
TreeSet - class ap.java.util.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.
TreeSet() - Constructor for class ap.java.util.TreeSet
Construct an initially empty set.
toString() - Method in class ap.java.lang.Double
Returns a representation of this object as a string.
toString() - Method in class ap.java.lang.Integer
Returns a representation of this object as a string.
toString() - Method in class ap.java.lang.Object
According to the AP Java subset (A and AB) students are expected to understand that String concatenation using + invokes the toString() method on an object.

A C D E G H I K L M N O P Q R S T
unofficial documentation for the APCS Java Subset