com.fitbur.github.dockerjava.api.model.Volume Maven / Gradle / Ivy
package com.fitbur.github.dockerjava.api.model;
import com.fitbur.apache.com.fitburmons.lang.builder.EqualsBuilder;
import com.fitbur.apache.com.fitburmons.lang.builder.HashCodeBuilder;
/**
* Represents a bind mounted volume in a Docker container.
*
* @see Bind
*/
public class Volume {
private String path;
public Volume(String path) {
this.path = path;
}
public String getPath() {
return path;
}
@Override
public String toString() {
return getPath();
}
@Override
public boolean equals(Object obj) {
if (obj instanceof Volume) {
Volume other = (Volume) obj;
return new EqualsBuilder().append(path, other.getPath()).isEquals();
} else
return super.equals(obj);
}
@Override
public int hashCode() {
return new HashCodeBuilder().append(path).toHashCode();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy