0

How do I most cleverly implement multiple generic parameters that I need in multiple classes (and packages)? Assuming I have the following code to use:

public class NewClass<A, B, C, D, E> {...}

How do I implement A,B,C,D,E most efficiently if I need these own types in other classes and packages?

Because if I create my own class for the data type (for example the class named "A"), the parametric type A and the created class A will not get along with each other.

Best regards and thanks in advance! :)

2
  • Does this answer your question? stackoverflow.com/questions/20716651/… Commented Mar 2, 2020 at 11:10
  • Unfortunately, that does not answer my question. Isn't there a way to replace the generic type with your custom class? Commented Mar 2, 2020 at 11:29

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.