Package 

Class Merge


  • 
    public class Merge
    
                        

    Utility class for merging one object's fields with the values from another object of the same type.

    Copyright 2017 Meniga Iceland Inc.

    • Method Summary

      Modifier and Type Method Description
      static <E> void merge(E object1, E object2) Overwrites all private, protected and public fields of object1 with those from object 2
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • merge

         static <E> void merge(E object1, E object2)

        Overwrites all private, protected and public fields of object1 with those from object 2

        Parameters:
        object1 - Object who's fields will be replaced with the ones from object2
        object2 - The source of data, the fields from this object will be copied to object1