Module life.expert

Class Objects


  • public final class Objects
    extends java.lang.Object
    helper methods for working with java objects
    • Constructor Summary

      Constructors 
      Constructor Description
      Objects()  
    • Method Summary

      Modifier and Type Method Description
      static <E> E deepCopyOfObject​(E copied, java.lang.Class<?> classOfObject)
      helper method: deep copy with google gson
      • Methods inherited from class java.lang.Object

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

      • Objects

        public Objects()
    • Method Detail

      • deepCopyOfObject

        public static <E> E deepCopyOfObject​(E copied,
                                             java.lang.Class<?> classOfObject)
        helper method: deep copy with google gson
        
         this.item2(MyCommon.deepCopyOf( this.item2() ,  List.class ) );
         
        Type Parameters:
        E - the type of copied object
        Parameters:
        copied - the copied object
        classOfObject - the class-literal of object. Type tag.
        Returns:
        the copy
        Throws:
        java.lang.NullPointerException - if argument nullable