commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anthony Bonafide <anthonymbonaf...@gmail.com>
Subject [LANG] Object Merge Functionality
Date Wed, 30 Nov 2016 00:10:37 GMT
Hello All,

     I was wondering if there is functionality within the commons-lang
library to merge two or more objects together. The desired functionality
would be, given a source and target object copy all the fields from the
source to the target where the destination’s fields are null. This is
similar to the behavior of Object.assign
<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign>
found
in javascript. I think this is useful when dealing with hierarchies where
 objects inherit defaults from other objects higher in the hierarchy. If
this feature does not exist and you think it is useful, I would like to
submit a pull request. Any thoughts?


Thank you,


Anthony Bonafide

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message