Reputation: 131
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
Reputation: 147
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
Reputation: 726
I believe that the correct term is Concrete class.
http://www.careerride.com/Java-concrete-class-abstract-class-interface.aspx
Upvotes: 7
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
Reputation:
I've heard of it being called and "Interface Implementation", and a "Concretion".
Upvotes: 0
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
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