forked from docker-java/docker-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathListVolumesCmdImpl.java
More file actions
43 lines (35 loc) · 1.23 KB
/
Copy pathListVolumesCmdImpl.java
File metadata and controls
43 lines (35 loc) · 1.23 KB
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.Collection;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import com.github.dockerjava.api.command.ListVolumesCmd;
import com.github.dockerjava.api.command.ListVolumesResponse;
import com.github.dockerjava.core.util.FiltersBuilder;
/**
*
* @author Marcus Linke
*
*/
public class ListVolumesCmdImpl extends AbstrDockerCmd<ListVolumesCmd, ListVolumesResponse> implements ListVolumesCmd {
private FiltersBuilder filters = new FiltersBuilder();
public ListVolumesCmdImpl(ListVolumesCmd.Exec exec) {
super(exec);
}
@Override
public Map<String, List<String>> getFilters() {
return filters.build();
}
@Override
public ListVolumesCmd withDanglingFilter(Boolean dangling) {
Objects.requireNonNull(dangling, "dangling have not been specified");
this.filters.withFilter("dangling", dangling.toString());
return this;
}
@Override
public ListVolumesCmd withFilter(String filterName, Collection<String> filterValues) {
Objects.requireNonNull(filterValues, filterName + " was not specified");
this.filters.withFilter(filterName, filterValues);
return this;
}
}