Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8103699
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T23:37:28+00:00 2026-06-05T23:37:28+00:00

Is there an interface in Java similar to the Callable interface, that can accept

  • 0

Is there an interface in Java similar to the Callable interface, that can accept an argument to its call method?

Like so:

public interface MyCallable<V> {
  V call(String s) throws Exception;
}

I would rather avoid creating a new type if there already exists something that I can use. Or is there a better strategy to having multiple clients implement and plug in a callable routine?

Copied from here http://www.programmingforums.org/thread27905.html

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T23:37:29+00:00Added an answer on June 5, 2026 at 11:37 pm

    Since Java 8 there is a whole set of Function-like interfaces in the java.util.function package. The one you’re asking for specifically is simply Function.

    Prior to Java 8, there was no general-purpose, built-in interface for this, but some libraries provided it.

    For example Guava has the Function<F,T> interface with the method T apply(F input). It also makes heavy use of that interface in several places.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the stituation that there is an Interface I with a method m,
Is there something similar to java's InvocationHandler in vala. That is, I want to
There is an example of Implementing an Interface in Java tutorial. I have repeated
Is there public interface in SDK 3.* to start video recording programmatically? Also how
Is there any Fluent WCF interface out there worth using? Maybe something like these:
Is there a common interface in Python that I could derive from to modify
I've already known that there is an interface in UIWebView for object c to
What I wanna do is a method that can generate instance of Class X
I'm writing an interface that requires classes to implement a clone() method. My naive
I have similar methods that needs to be implemented for different concepts. But call

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.