public static < T > Decoration < T > of ( Decorator < T > decorator , T data ) { Validate . notNull ( decorator , "The decorator is required" ) ; Validate . notNull ( data , "The decoration data is required" ) ; return new Decoration <> ( decorator , data , null ) ; }
Basic construction . Only the data is required