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 Stringm_Commandthe command.protected Stringm_ContainerIDthe container ID.protected Stringm_Createdwhen the image was created.protected Stringm_Imagethe image.protected Stringm_Namesthe names.protected Stringm_Portsthe ports.protected Stringm_Statusthe status of the container.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(DockerContainer o)Compares itself with the other image.booleanequals(Object o)Checks whether the objects are equal.StringgetCommand()Returns the command.StringgetContainerID()Returns the container ID.StringgetCreated()Returns the created information.StringgetImage()Returns the image.StringgetNames()Returns the names.StringgetPorts()Returns the ports.StringgetStatus()Returns the status.inthashCode()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:
compareToin interfaceComparable<DockerContainer>- Parameters:
o- the other image- Returns:
- the comparison result
-
equals
public boolean equals(Object o)
Checks whether the objects are equal.- Overrides:
equalsin classObject- Parameters:
o- the object to compare with- Returns:
- true if the same content
- See Also:
compareTo(DockerContainer)
-
-