Interfaces

When we introduced collections previously, we spoke of a type of data structure that supports a specified set of operations: add, remove, size, etc.

Each operation has a specified set of input and output, and usually some description of how the operation functions.

We would thus demand that any data structure that wishes to call itself a collection must support those operations. Once this demand is satisfied however, we can use this structure with the full knowledge that we have access to the specified operations.

Some 'real-world' examples

Containers

Cars

Phones

Interfaces in Java