Is there a standard interface for objects that populate their values from same-type objects?
Essentially the opposite of
Cloneable, an interface declaring some method like this:
I feel like either the JDK or some Commons library (Apache, Guava) probably already has something like this, so I don't want to make my own if I can avoid it.5 Replies
⌛ This post has been reserved for your question.
Hey @Haiku! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./closeor theClose Postbutton above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
no but why would you need that to work with
Object
you can make something like this with records though
why do you need it though?Are you coming from C++ and looking for something like the
std::copy template?I don't really see a reason why that'd be necessary though
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping.
Warning: abusing this will result in moderative actions taken against you.
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping.
Warning: abusing this will result in moderative actions taken against you.