-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathManyParametersBuilder.java
More file actions
38 lines (31 loc) · 939 Bytes
/
ManyParametersBuilder.java
File metadata and controls
38 lines (31 loc) · 939 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package com.example;
public class ManyParametersBuilder {
private String computerName;
private int timeout = 0;
private String method;
private int size = 0;
private byte[] data = null;
public ManyParametersBuilder setComputerName(String computerName) {
this.computerName = computerName;
return this;
}
public ManyParametersBuilder setTimeout(int timeout) {
this.timeout = timeout;
return this;
}
public ManyParametersBuilder setMethod(String method) {
this.method = method;
return this;
}
public ManyParametersBuilder setSize(int size) {
this.size = size;
return this;
}
public ManyParametersBuilder setData(byte[] data) {
this.data = data;
return this;
}
public ManyParameters createManyParameters() {
return new ManyParameters(computerName, timeout, method, size, data);
}
}