Abstract data types or ADTs are data types described in terms of the operations they support (their interface) rather than how they are implemented.
For example, a sequence could be defined as follows. A sequence contains a variable number of ordered elements, and supports the following operations:
- get a handle to the first element
- get a handle to the next element
- get a handle to the last element
- get a handle to the previous element
- get a handle to an arbitrary element
- insert an element at the beginning of the sequence
- insert an element at the end of the sequence
- insert an element after an element of a specific handle
- delete the first element
- delete the last element
- delete the element at a specific handle
- delete all elements between two handles
- get the value of the associated element of this handle
- modify the value of the associated element of this handle
Some programming languages, such as Ada and Modula-2, have explicit support for abstract data types. Object-oriented languages carry this a step further by adding inheritance and polymorphism to ADTs to get "objects".