Package adams.docker
Class DockerContainer
- java.lang.Object
-
- adams.docker.DockerContainer
-
- All Implemented Interfaces:
Serializable
,Comparable<DockerContainer>
public class DockerContainer extends Object implements Serializable, Comparable<DockerContainer>
Simple container for docker containers.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected String
m_Command
the command.protected String
m_ContainerID
the container ID.protected String
m_Created
when the image was created.protected String
m_Image
the image.protected String
m_Names
the names.protected String
m_Ports
the ports.protected String
m_Status
the status of the container.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(DockerContainer o)
Compares itself with the other image.boolean
equals(Object o)
Checks whether the objects are equal.String
getCommand()
Returns the command.String
getContainerID()
Returns the container ID.String
getCreated()
Returns the created information.String
getImage()
Returns the image.String
getNames()
Returns the names.String
getPorts()
Returns the ports.String
getStatus()
Returns the status.int
hashCode()
Generates a hash code.
-
-
-
Field Detail
-
m_ContainerID
protected String m_ContainerID
the container ID.
-
m_Image
protected String m_Image
the image.
-
m_Command
protected String m_Command
the command.
-
m_Created
protected String m_Created
when the image was created.
-
m_Status
protected String m_Status
the status of the container.
-
m_Ports
protected String m_Ports
the ports.
-
m_Names
protected String m_Names
the names.
-
-
Constructor Detail
-
DockerContainer
public DockerContainer(String containerID, String image, String command, String created, String status, String ports, String names)
Initializes the container.- Parameters:
containerID
- the container ID (hash)command
- the commandimage
- the imagecreated
- the created stringstatus
- the statusports
- the portsnames
- the names
-
-
Method Detail
-
getContainerID
public String getContainerID()
Returns the container ID.- Returns:
- the ID
-
getImage
public String getImage()
Returns the image.- Returns:
- the image
-
getCommand
public String getCommand()
Returns the command.- Returns:
- the command
-
getCreated
public String getCreated()
Returns the created information.- Returns:
- the created information
-
getStatus
public String getStatus()
Returns the status.- Returns:
- the status
-
getPorts
public String getPorts()
Returns the ports.- Returns:
- the ports
-
getNames
public String getNames()
Returns the names.- Returns:
- the names
-
compareTo
public int compareTo(DockerContainer o)
Compares itself with the other image.- Specified by:
compareTo
in interfaceComparable<DockerContainer>
- Parameters:
o
- the other image- Returns:
- the comparison result
-
equals
public boolean equals(Object o)
Checks whether the objects are equal.- Overrides:
equals
in classObject
- Parameters:
o
- the object to compare with- Returns:
- true if the same content
- See Also:
compareTo(DockerContainer)
-
-