user1585968
user1585968

Reputation: 131

What do you call a class that implements an interface?

Say class A implements interface B; what can we call class A in relation to interface B? Is it the case that class A is a 'subclass' of interface B (as if B was a class), or is there a special term for implementing an interface, or is there none?

Thanks in advance

Edit: Would accept Alex's response if it was an answer

Upvotes: 12

Views: 6025

Answers (7)

I don't know if this gives you a satisfactory answer, but let me give a try!

Any class that inherits a parent class, or implements an interface is a "Polymorph" of the parent class / interface. i.e., wherever you need an interface instance, your polymorphic version (or polymorph) can fit in well.

For exammple, if a class "FileLogger" implements "ILogger" interface, the "FileLogger" class is a polymorph of the type "ILogger".

Upvotes: 1

Emmanuel Campos
Emmanuel Campos

Reputation: 726

I believe that the correct term is Concrete class.

http://www.careerride.com/Java-concrete-class-abstract-class-interface.aspx

Upvotes: 7

Pratswinz
Pratswinz

Reputation: 1476

"Interface implementation" is generalised while in android we usually call it "Interface Listener class".In your case if A implements interface B then it will also implement its methods.

Upvotes: 1

Bart
Bart

Reputation: 17371

You could say: A is an implementation of B.

Upvotes: 4

user11937
user11937

Reputation:

I've heard of it being called and "Interface Implementation", and a "Concretion".

Upvotes: 0

Ben
Ben

Reputation: 36

You don't call classes that implement an interface anything, at least I don't know of any specific term, they're just implementing a certain set of property specifications and methods without necessarily having anything to do with it in OO terms. People seem to often denote "interface implementation" as "interface inheritance", the latter is wrong and should be used in its right meaning (which is actually when interfaces are inheriting other interfaces, obviously) to avoid confusion.

TL;DR I believe there's no term for it.

Upvotes: 0

dss539
dss539

Reputation: 6947

The "interface implementation" is typically what I have heard it called. I'm quite confident that most developers would understand what you mean when you say that.

Upvotes: 3

Related Questions