forked from docker-java/docker-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSearchImagesCmdImpl.java
More file actions
43 lines (34 loc) · 917 Bytes
/
Copy pathSearchImagesCmdImpl.java
File metadata and controls
43 lines (34 loc) · 917 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
39
40
41
42
43
package com.github.dockerjava.core.command;
import java.util.List;
import com.github.dockerjava.api.command.SearchImagesCmd;
import com.github.dockerjava.api.model.SearchItem;
import com.google.common.base.Preconditions;
/**
* Search images
*
* @param term - search term
*
*/
public class SearchImagesCmdImpl extends AbstrDockerCmd<SearchImagesCmd, List<SearchItem>> implements SearchImagesCmd {
private String term;
public SearchImagesCmdImpl(SearchImagesCmd.Exec exec, String term) {
super(exec);
withTerm(term);
}
@Override
public String getTerm() {
return term;
}
@Override
public SearchImagesCmd withTerm(String term) {
Preconditions.checkNotNull(term, "term was not specified");
this.term = term;
return this;
}
@Override
public String toString() {
return new StringBuilder("search ")
.append(term)
.toString();
}
}