public static < T > Decoration < T > error ( Decorator < T > decorator , String error ) { Validate . notNull ( decorator , "The decorator is required" ) ; Validate . notBlank ( error , "The decoration error is required" ) ; return new Decoration <> ( decorator , null , error ) ; }
Basic construction . With an error