forked from docker-java/docker-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTopContainerResponse.java
More file actions
45 lines (36 loc) · 979 Bytes
/
Copy pathTopContainerResponse.java
File metadata and controls
45 lines (36 loc) · 979 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
44
45
package com.github.dockerjava.api.command;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.base.Joiner;
/**
*
* @author marcus
*
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class TopContainerResponse {
@JsonProperty("Titles")
private String[] titles;
@JsonProperty("Processes")
private String[][] processes;
public String[] getTitles() {
return titles;
}
public String[][] getProcesses() {
return processes;
}
@Override
public String toString() {
Joiner joiner = Joiner.on("; ").skipNulls();
StringBuffer buffer = new StringBuffer();
buffer.append("[");
for(String[] fields: processes) {
buffer.append("[" + joiner.join(fields) + "]");
}
buffer.append("]");
return "TopContainerResponse{" +
"titles=" + joiner.join(titles) +
", processes=" + buffer.toString() +
'}';
}
}