Questions tagged [multiple-interface-implem]
13 questions
171
votes
17 answers
Java Multiple Inheritance
In an attempt to fully understand how to solve Java's multiple inheritance problems I have a classic question that I need clarified.
Lets say I have class Animal this has sub classes Bird and Horse and I need to make a class Pegasus that extends…

Sheli
- 1,717
- 2
- 11
- 9
15
votes
3 answers
Serialize Dictionary to JSON with DataContractJsonSerializer
I have an object tree that I'm serializing to JSON with DataContractJsonSerializer. Dictionary gets serialized but I don't like the markup - the items are not rendered like this:
{key1:value, key2:value2}
but rather like an array of…

Vroomfundel
- 730
- 7
- 24
5
votes
2 answers
How does implementing multiple COM interfaces work in C++?
I am trying to understand this example code regarding Browser Helper Objects.
Inside, the author implements a single class which exposes multiple interfaces (IObjectWithSite, IDispatch).
His QueryInterface function performs the following:
if(riid ==…

Martin
- 5,945
- 7
- 50
- 77
2
votes
2 answers
Why is it not possible to implement Comparable multiple times?
It seems like you usually implemented the java.lang.Comparable interface without specifying the type parameter.
public abstract class Area implements Comparable {
@Override
public int compareTo(Object other) {
if (other instanceof…

Niklas R
- 16,299
- 28
- 108
- 203
2
votes
1 answer
two interfaces, multiple inheritance combine into one container?
I stumbled upon the following problem: I have two packages A and B working fine for each own. Each has its own interface and his own implementation. Now i made a package C combining a adapter of A with a concrete Implemenation of B. C actually only…

Philipp Michalski
- 606
- 8
- 18
1
vote
2 answers
Qt DBus: register object that implements multiple interfaces
Using the Qt DBus library, I'm having a hard time registering an object implementing multiple interfaces.
I have…

xtofl
- 40,723
- 12
- 105
- 192
1
vote
1 answer
Wrong IP address returned for pfSense host name on a router with multiple LANs when using DNS Forwarder/Resolver
Running pfSense 2.4.4 (first saw the problem in 2.0.3) using DNS Forwarder or DNS Resolver for Split-DNS with multiple LANs. LAN1 is 10.10.10.0/24 and LAN2 is 192.168.69.0/24. pfSense router is .1 on both interfaces and DNS Forwarder/Resolver is…

sthames42
- 888
- 8
- 19
1
vote
1 answer
Can I globally set the interface implementation to use?
I have an interface:
public interface IHHSDBUtils
{
void SetupDB();
bool TableExists(string tableName);
. . .
...that has multiple implementers:
public class SQLiteHHSDBUtils : IHHSDBUtils
public class SQCEHHSDBUtils :…

B. Clay Shannon-B. Crow Raven
- 8,547
- 144
- 472
- 862
0
votes
0 answers
Multiple inheritance problem after arrival of default method feature in interface
After introducing java 8 default method for interface we are getting diamond problem after implementing two interfaces with same method name , but we solve that by overriding , why can't we use same technique for multiple inheritance for class
0
votes
2 answers
Why we can't use access modifier in the methods of class which implements two interfaces consist of same methods?
public interface A
{
void FirstDemo();
void SecondDemo();
}
public interface B
{
void FirstDemo();
void SecondDemo();
}
public class Demo : A, B
{
void A.FirstDemo()
{
…

Prince Gajjar
- 46
- 8
0
votes
1 answer
Tomcat with two NIC | One for External Users | Other for connecting With DB
I have many application deployed on linux machine with tomcat. Currently it is running on single IP, now I need to setup two different NIC (Network Interface Card).
One NIC for only external users to connect to my application
Second NIC only for my…

Salman Raza
- 25
- 7
0
votes
1 answer
Consequences in PHP of implementing an interface through two different routes?
What are the consequences of implementing the same interface through two different routes in PHP, are there any?
What I mean, is something like this:
interface baseInterface {}
abstract class baseClass implements baseInterface { }
interface…

Daniel Bingham
- 12,414
- 18
- 67
- 93
-4
votes
1 answer
Hide an interface from process task manager
I'm writing a WPF / C # program with multiple interfaces. In some cases I want an interface to remain open in the background while another interface is open in foreground. To do this I've used the interface2.Show() method, without calling the…

Massimo P.
- 55
- 1
- 10