Collections Hierarchy
classDiagram Iterable --|> Collection Collection --|> List List --> ArrayList List --> LinkedList List --> Vector List --> Stack Collection --|> Set Set --> SortedSet SortedSet --> TreeSet Collection --|> Queue class Iterable{ java.util } class Collection { ---INTERFACE--- } class Set { ---INTERFACE--- } class SortedSet { ---INTERFACE--- } class TreeSet { ---CLASS--- } class List:::interface { . ----INTERFACE---- . - Methods are index-based add() get() set() remove() clear() size() } class ArrayList { . ----CLASS---- . - For storing and accessing data - Elements in an ArrayList are objects - Cannot use primitives, must use wrapper class } class Vector { ---CLASS--- } class Stack { ---CLASS--- } class LinkedList { . ----CLASS---- . - Used to manipulate data. - Stores items in containers. - The list has a link to the first container and each container has a link to the next container in the list. addFirst() addLast() removeFirst() removeLast() getFirst() getLast() } class Queue { ---INTERFACE--- }
classDiagram class Exception { }
Java I/O Hierarchy
classDiagram Closeable <|--InputStream : implements Closeable <|-- OutputStream : implements InputStream <-- FileInputStream InputStream <-- ByteArrayInputStream InputStream <-- FilterInputStream InputStream <-- PipedInputStream InputStream <-- ObjectInputStream FilterInputStream <-- DataInputStream FilterInputStream <-- BufferedInputStream FilterInputStream <-- PushBackInputStream OutputStream <-- FileOutputStream OutputStream <-- ByteArrayOutputStream OutputStream <-- FilterOutputStream OutputStream <-- PipedOutputStream OutputStream <-- ObjectOutputStream FilterOutputStream <-- DataOutputStream FilterOutputStream <-- BufferedOutputStream FilterOutputStream <-- PushBackOutputStream class Closeable { superinterface } class InputStream { } class FileInputStream { } class ByteArrayInputStream { } class FilterInputStream { } class DataInputStream { } class BufferedInputStream { } class PushBackInputStream { } class PipedInputStream { } class ObjectInputStream { } class OutputStream { } class FileOutputStream { } class ByteArrayOutputStream { } class FilterOutputStream { } class DataOutputStream { } class BufferedOutputStream { } class PushBackOutputStream { } class PipedOutputStream { } class ObjectOutputStream { }