Questions tagged [interface-implementation]
137 questions
0
votes
0 answers
How to use an interface where one module implements the functionality and another is calling it for the result in Kotlin
How can I define and implement an interface where one Module is using it for the implementation (lets say the View layer) and another Module is calling it to get the result from the defined implementation (say the Backend Layer)?
I want to keep…

RandomType
- 47
- 1
- 8
0
votes
0 answers
ISupportInitialize in WinForms controls: explicit or implicit implementation?
I have a custom WinForms control inherited from the WinForms Control class. The control also explicitly implements the System.ComponentModel.ISupportInitialize interface used by the WinForms Designer to insert the corresponding BeginInit/EndInit…

TecMan
- 2,743
- 2
- 30
- 64
0
votes
1 answer
.NET Core - what is the best practice of implementing an interface due to conditions at runtime
I am working on email service which can send emails using IMAP, SMTP or third-party software (like SendGrid).
And I need to determine which service will handle the process of sending at runtime, because the user will specify which provider will be…

James.mikael
- 99
- 1
- 9
0
votes
1 answer
Where to put implementation of frequently used interface in Clean Architecture
In my Application project I have INestedRequestObjectEncryptor interface, which is frequently used (in all endpoints), because it's used to decrypt requests and encrypt responses. Where should I put implementation of this interface in Clean…

Szyszka947
- 473
- 2
- 5
- 21
0
votes
2 answers
A function that are existing only in one concrete implementation of an interface
I have a interface with one method:
public interface MyInterface {
public void doSomething();
}
And multiple concrete implementations of 'MyInterface':
Implementation1:
public class Implementation1 implements MyInterface {
@Override
…
0
votes
0 answers
How do I abstract a base interface where certain fields determine another field's type/values, and then define stricter child interfaces from that?
My app allows users to create questionnaires for other people to fill out. While creating a form, users are allowed to select between 5 different categories of questions, and each one maps to a specific type of the response field. Both a newly…

corbiter
- 31
- 1
0
votes
1 answer
Is it possible to implement an interface for a type I can't change (in the context of C#'s preview feature: static abstract interface members)
EDIT: I've finally found out why I was remembering external interface implementations possibly being a feature, it is because months ago I must have been reading the static abstract interface members proposal at around the same time as this…

Petrusion
- 940
- 4
- 11
0
votes
1 answer
How do you implement your own lastIndexOf(E e) for LinkedLists in java?
public int lastIndexOf(E e) {
// Left as an exercise
// TODO : Implement this method
Node current = tail;
not sure how to complete this for loop:
for (int i = size - 1; i >= 0; i--) {
if(e.equals(current))
return i;
}
return…

maj
- 1
- 1
0
votes
1 answer
Implementation and extending Interface with generic
I have a list of monotonous interfaces. Like this:
interface interface10 {
trackingId: string
status: string
payload: {
code: string
message: string
}
}
interface interface11 {
trackingId: string
status: string
payload: {
…

Mauzzz0
- 53
- 1
- 6
0
votes
1 answer
Dart - implementing a class method with argument as implemented class
I am developing external library. Assume I have different implementations of logger class, I create abstract class ILogger which those classes can then implement.
I also have various implementations of log objects that I want to adhere to ILog…

user3056783
- 2,265
- 1
- 29
- 55
0
votes
1 answer
Why can't I explicitly set the access level for GetEnumerator?
I'm creating a simple collection that is implementing ICollection, which from my understanding inherits from IEnumerable (it is called interface inheritance at that point, correct?). With the implementation's auto generated code, there's a…

Hazel へいぜる
- 2,751
- 1
- 12
- 44
0
votes
0 answers
Implementing classes of Spring service interface need different method signature
I don't know if this question belongs here or softwareengineering.stackexchange.
I have a service named car:
public interface CarSerivce{ Car create(String model);}
Now I want to have two capabilities, create and create random. Creating a random…

Hessam
- 1,377
- 1
- 23
- 45
0
votes
1 answer
Abstract fun invoke() not implemented
I've created a View and I encountered a problem with my interface for Buttons ClickListener.
Interface looks like this
interface CustomButtonsClickListener : () -> Unit {
fun onPlusClick(view: View, button: ImageButton)
fun…

SkypeDogg
- 1,000
- 2
- 13
- 28
0
votes
2 answers
Does a class which is extending an abstract class still has to implement the interface that abstract class is implementing?: java
public abstract class ClassA implements ClassB{
}
public class ClassC extends ClassA implements ClassB{
}
Since class "ClassC" is extending class "ClassA", does "ClassC" still has to implement "ClassB"? Or "ClassB" is automatically implemented…

shrumsowen11
- 47
- 9
0
votes
1 answer
Can an Implementing Class of Foo be called as an extending class of Foo?
This question has been baffling to me; below is an example.
interface class:
public interface UserInterface{
public String make_nickname();
}
implementing class:
public class UserInfo implements UserInterface{
private String name;
…

Jangwhan Jeong
- 23
- 6