-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathExperimentBuilder.java
56 lines (51 loc) · 2.04 KB
/
ExperimentBuilder.java
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package ml.comet.experiment;
import lombok.experimental.UtilityClass;
import ml.comet.experiment.builder.ApiExperimentBuilder;
import ml.comet.experiment.builder.CometApiBuilder;
import ml.comet.experiment.builder.OnlineExperimentBuilder;
import ml.comet.experiment.impl.ApiExperimentImpl;
import ml.comet.experiment.impl.CometApiImpl;
import ml.comet.experiment.impl.OnlineExperimentImpl;
/**
* The factory of builders to be used for creation of different {@link Experiment} implementations.
*/
@UtilityClass
public class ExperimentBuilder {
/**
* Returns instance of the {@link OnlineExperimentBuilder} which can be used to
* configure and create fully initialized instance of the {@link OnlineExperiment}.
*
* <p>The configured instance of {@link OnlineExperiment} can be created as following:
* <pre>
* OnlineExperiment experiment = ExperimentBuilder
* .OnlineExperiment()
* .build();
* </pre>
*
* @return the instance of the {@link OnlineExperimentBuilder}.
*/
@SuppressWarnings({"MethodName"})
public static OnlineExperimentBuilder OnlineExperiment() {
return OnlineExperimentImpl.builder();
}
/**
* The factory to create instance of the {@link ApiExperimentBuilder} which can be used
* to configure and create fully initialized instance of the {@link ApiExperiment}.
*
* @return the initialized instance of the {@link ApiExperimentBuilder}.
*/
@SuppressWarnings({"MethodName"})
public static ApiExperimentBuilder ApiExperiment() {
return ApiExperimentImpl.builder();
}
/**
* The factory to create instance of the {@link CometApiBuilder} which can be used to configure
* and create fully initialized instance of the {@link CometApi}.
*
* @return the instance of the {@link CometApiBuilder}.
*/
@SuppressWarnings("checkstyle:MethodName")
public static CometApiBuilder CometApi() {
return CometApiImpl.builder();
}
}