documentationfor yFiles for HTML 2.6

Interface

An interface that may or may not have default implementations of its methods, properties and fields.

Inheritance Hierarchy
Interface

Remarks

Interfaces have very specific rules in case two interfaces with the same member are implemented by a subtype:

  • If both method definitions are abstract, then the method is abstract.
  • If one method definition is abstract and the other concrete, then the concrete method is used.
  • If both method definitions are concrete and the interfaces are implemented at the same level, then the method is abstract.
  • If both method definitions are concrete and one of the interfaces is a sub-type of the other, then its method definition will be used.

In all of those cases, the rule is that a subtype overrides the parent types' definitions. Example: Given the interfaces A, B, C and D where A defines a method "a" to be abstract and B and C extending interface A with concrete implementations of "a", when D is a interface that implements both B and C, its version of "a" will be abstract, unless it defines its own implementation of "a", in which case that definition is used.

All interface types have a $class property, which contains their type, and a static isInterface method that can be used to test whether an object implements the interface.

Type Details

yfiles module
lang
yfiles-umd modules
All modules
Legacy UMD name
yfiles.lang.Interface

Static Methods