17
17
18
18
package org .openqa .selenium .print ;
19
19
20
+ import org .openqa .selenium .internal .Require ;
21
+
20
22
public class PrintOptions {
21
23
22
24
public enum Orientation {
@@ -36,19 +38,19 @@ public Orientation getOrientation() {
36
38
}
37
39
38
40
public void setOrientation (Orientation orientation ) {
39
- this .orientation = orientation ;
41
+ this .orientation = Require . nonNull ( " orientation" , orientation ) ;
40
42
}
41
43
42
44
public String [] getPageRanges () {
43
45
return this .pageRanges ;
44
46
}
45
47
46
48
public void setPageRanges (String [] ranges ) {
47
- this .pageRanges = ranges ;
49
+ this .pageRanges = Require . nonNull ( "pageRanges" , ranges ) ;
48
50
}
49
51
50
52
public void setBackground (boolean background ) {
51
- this .background = background ;
53
+ this .background = Require . nonNull ( " background" , background ) ;
52
54
}
53
55
54
56
public boolean getBackground () {
@@ -71,15 +73,15 @@ public boolean getShrinkToFit() {
71
73
}
72
74
73
75
public void setShrinkToFit (boolean value ) {
74
- this .shrinkToFit = value ;
76
+ this .shrinkToFit = Require . nonNull ( " value" , value ) ;
75
77
}
76
78
77
79
public void setPageSize (PageSize pageSize ) {
78
- this .pageSize = pageSize ;
80
+ this .pageSize = Require . nonNull ( " pageSize" , pageSize ) ;
79
81
}
80
82
81
83
public void setPageMargin (PageMargin margin ) {
82
- this .pageMargin = margin ;
84
+ this .pageMargin = Require . nonNull ( " margin" , margin ) ;
83
85
}
84
86
85
87
public PageSize getPageSize () {
0 commit comments