calling interface function that is not implemented in java

A M A :

I am having trouble understanding a code that is using an interface function but i don't seem to find the implementation for it. Is it possible to call an unimplemented interface function? The code is below, The class that calls the unimplemented function combineResults:

public final class Parallel { 
 public static <T> T For(int start, int end, 
   ParallelForDelegate<T> delegate, T input) { 
  T res = null; 
  for (int i = start; i < end; i++) { 
   res = delegate.combineResults(res, delegate.delegate(i, input)); 
  } 
  return res; 
 } 
 }

The interface:

public  interface  ParallelForDelegate<T> { 
 public  T delegate(int i, T input); 

 public  T combineResults(T result1, T result2); 
}

Reference: https://www.programcreek.com/java-api-examples/index.php?source_dir=SecugenPlugin-master/src/sourceafis/simple/Fingerprint.java#

HBo :

There has to be an implementation somewhere, but sometimes you can have a hard time finding it, because of various factories, dependecy injections, 'on-the-fly' building, ... mecanisms

On complex APIs like Hibernate, it can be tedious. However, the interface is supposed to give you enough details on its usage so you don't actually have to know how it's implemented.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Explicitly calling a default method in java - when the implemented interface uses generics

From Java

Java: Calling in main implemented Interface Methods from a jUnit - Test

From Dev

How is calling a function on a subtype implemented?

From Dev

Calling function that was declared virtual in interface (and implemented in derived class) inside base abstract class

From Dev

What is the use of calling Interface methods in the implemented class?

From Dev

Java: Calling an interface's function from a Generic List that Extends it

From Dev

calling postgres function with UDT parameter from java giving SQL is not yet implemented exception

From Dev

Access values of implemented interface members in function

From Dev

using functions of an implemented interface creates 'not a function' error

From Dev

C# Basics - How do interfaces work and calling implemented interface

From Java

How is generic function implemented in java?

From Dev

Java cast object to an interface that is not implemented but matches signature

From Java

Why Callback Interface of Java extended and not implemented in Scala

From Java

Java dynamic function calling

From

Golang, Go : implicitly calling interface function?

From Dev

creating sql function implemented in java via flyway

From Dev

java sqlite - Error: function not yet implemented for SQLite

From Dev

Generic information about interface implemented by field type in Java

From Java

Why a generic method of an interface can be implemented as non-generic in Java?

From Dev

Java programming architecture - Interface and implemented class should be in same package?

From Java

java.nio.file: Where is the Path interface actually implemented?

From Dev

Call interface method implemented in an activity from a java class

From Dev

Java Predicate Interface - How the method is working - Though it is not implemented in my class

From Dev

How does the java compiler check if all methods in an interface were implemented?

From Dev

Java: Calling a method by reflection in a functional interface

From Java

Java generic interface calling with abstract parameter

From Dev

How Variable of an Interface is Working in JAVA and Calling the Methods of Interface?

From Java

Java calling function with class in argument

From Dev

Java Reflection - calling a a date function

Related Related

  1. 1

    Explicitly calling a default method in java - when the implemented interface uses generics

  2. 2

    Java: Calling in main implemented Interface Methods from a jUnit - Test

  3. 3

    How is calling a function on a subtype implemented?

  4. 4

    Calling function that was declared virtual in interface (and implemented in derived class) inside base abstract class

  5. 5

    What is the use of calling Interface methods in the implemented class?

  6. 6

    Java: Calling an interface's function from a Generic List that Extends it

  7. 7

    calling postgres function with UDT parameter from java giving SQL is not yet implemented exception

  8. 8

    Access values of implemented interface members in function

  9. 9

    using functions of an implemented interface creates 'not a function' error

  10. 10

    C# Basics - How do interfaces work and calling implemented interface

  11. 11

    How is generic function implemented in java?

  12. 12

    Java cast object to an interface that is not implemented but matches signature

  13. 13

    Why Callback Interface of Java extended and not implemented in Scala

  14. 14

    Java dynamic function calling

  15. 15

    Golang, Go : implicitly calling interface function?

  16. 16

    creating sql function implemented in java via flyway

  17. 17

    java sqlite - Error: function not yet implemented for SQLite

  18. 18

    Generic information about interface implemented by field type in Java

  19. 19

    Why a generic method of an interface can be implemented as non-generic in Java?

  20. 20

    Java programming architecture - Interface and implemented class should be in same package?

  21. 21

    java.nio.file: Where is the Path interface actually implemented?

  22. 22

    Call interface method implemented in an activity from a java class

  23. 23

    Java Predicate Interface - How the method is working - Though it is not implemented in my class

  24. 24

    How does the java compiler check if all methods in an interface were implemented?

  25. 25

    Java: Calling a method by reflection in a functional interface

  26. 26

    Java generic interface calling with abstract parameter

  27. 27

    How Variable of an Interface is Working in JAVA and Calling the Methods of Interface?

  28. 28

    Java calling function with class in argument

  29. 29

    Java Reflection - calling a a date function

HotTag

Archive