interface

A declaration of a coherent set of public features and obligations; a contract between providers and consumers of services.

See also classifier, realization.

Semantics

An interface is a classifier for the externally visible properties, operations, and receptions of an implementation classifier, without specification of internal structure. An interface may constrain the way in which its operations are invoked and may impose pre-and postconditions on its operations. Each interface often specifies only a limited part of the behavior of an actual class. An interface should define a coherent set of capabilities, whereas an implementation class often combines several purposes. A class may support many interfaces, either disjoint or overlapping ...

Get Unified Modeling Language Reference Manual, The, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.