Close

Abstract Data Type

[Updated: Apr 19, 2016, Created: Apr 19, 2016]

Software Engineering Programming Java Collections 

It is a logical model for data types where a data type is defined by its behavior (semantics), specifically in terms of possible values, possible operations on data of this type. The user does not need any technical knowledge of how a particular implementation of ADT works

An ADT has certain properties and abilities; knowing these is all that is required to make use of an ADT object.

This contrasts with data structures, which are concrete representations of data, and are the point of view of an implementer, not a user.

Abstract data types are defined primarily by their interface: the operations that can be carried out on them.
The underlying mechanism (the data structure) used to implement them, is typically not visible to their user.

Certain implementations of an ADT, may be more efficient than others, in different situations.



Examples:

  • Collection or Container: A generic grouping of data items.
  • List or Sequence: An ordered sequence of items.
  • Set: An unordered group of items with no duplicates.
  • Multiset or Bag: Like Set but allows duplicates.
  • Map or Associative Array, or Dictionary: A collection of key-value pairs, each key appears just once.
  • Multimap: Like Map but more than one value may be associated with and returned for a given key.
  • Tree: represents hierarchies of elements
  • Graph: Roughly like tree but represents more general relations such as the map of city.
  • Stack: A LIFO (Last in first out) sequential groups of elements.
  • Queue: A FIFO (First in first out) sequential groups of elements.
  • Priority queue: Like Queue but an element with high priority is served before an element with low priority.
  • Double-ended queue: Like Queue but elements can be added to or removed from either the front (head) or back (tail).
  • Double-ended priority queue: A combination of Priority queue and Double ended queue.

See Also