11

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

user1585968
  • 121
  • 1
  • 5

7 Answers7

6

I believe that the correct term is Concrete class.

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

Emmanuel Campos
  • 652
  • 1
  • 9
  • 24
  • This is the term (concrete) used all the time in dev circles when talking about implementing an interface or abstract class. I just couldn't think of the term! – Skystrider Jun 28 '17 at 17:19
  • 1
    I believe the implementing class doesn't have to be a concrete class. Even an abstract class can implement an interface. – Dinesh Muciliath Jayadevan Dec 06 '21 at 14:43
3

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.

dss539
  • 6,804
  • 2
  • 34
  • 64
3

You could say: A is an implementation of B.

MattDavey
  • 8,897
  • 3
  • 31
  • 54
Bart
  • 17,070
  • 5
  • 61
  • 80
  • I would say `A` is **an** implementation of `B` since it sounds as if there's a single implementation when using the word _the_ – jamesSampica Aug 08 '13 at 18:40
1

"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.

Pratswinz
  • 1,476
  • 11
  • 24
1

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".

0

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.

Ben
  • 36
  • 2
0

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