public DockerImageName(String name, String tag) { this.rawName = name; final int slashIndex = name.indexOf('/'); String remoteName; if (slashIndex == -1 || (!name.substring(0, slashIndex).contains(".") && !name.substring(0, slashIndex).contains(":") && !name.substring(0, slashIndex).equals("localhost"))) { registry = ""; remoteName = name; } else { registry = name.substring(0, slashIndex - 1); remoteName = name.substring(slashIndex + 1); } if (tag.startsWith("sha256:")) { repo = remoteName; versioning = new Sha256Versioning(tag); } else { repo = remoteName; versioning = new TagVersioning(tag); } }
public DockerImageName(String name) { this.rawName = name; final int slashIndex = name.indexOf('/'); String remoteName; if (slashIndex == -1 || (!name.substring(0, slashIndex).contains(".") && !name.substring(0, slashIndex).contains(":") && !name.substring(0, slashIndex).equals("localhost"))) { registry = ""; remoteName = name; } else { registry = name.substring(0, slashIndex); remoteName = name.substring(slashIndex + 1); } if (remoteName.contains("@sha256:")) { repo = remoteName.split("@sha256:")[0]; versioning = new Sha256Versioning(remoteName.split("@sha256:")[1]); } else if (remoteName.contains(":")) { repo = remoteName.split(":")[0]; versioning = new TagVersioning(remoteName.split(":")[1]); } else { repo = remoteName; versioning = new TagVersioning("latest"); } }
@java.lang.Override @java.lang.SuppressWarnings("all") public int hashCode() { final int PRIME = 59; int result = 1; final java.lang.Object $tag = this.getTag(); result = result * PRIME + ($tag == null ? 43 : $tag.hashCode()); return result; } }
@java.lang.Override @java.lang.SuppressWarnings("all") public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof DockerImageName.TagVersioning)) return false; final DockerImageName.TagVersioning other = (DockerImageName.TagVersioning) o; if (!other.canEqual((java.lang.Object) this)) return false; final java.lang.Object this$tag = this.getTag(); final java.lang.Object other$tag = other.getTag(); if (this$tag == null ? other$tag != null : !this$tag.equals(other$tag)) return false; return true; }
public DockerImageName(String name) { this.rawName = name; final int slashIndex = name.indexOf('/'); String remoteName; if (slashIndex == -1 || (!name.substring(0, slashIndex).contains(".") && !name.substring(0, slashIndex).contains(":") && !name.substring(0, slashIndex).equals("localhost"))) { registry = ""; remoteName = name; } else { registry = name.substring(0, slashIndex); remoteName = name.substring(slashIndex + 1); } if (remoteName.contains("@sha256:")) { repo = remoteName.split("@sha256:")[0]; versioning = new Sha256Versioning(remoteName.split("@sha256:")[1]); } else if (remoteName.contains(":")) { repo = remoteName.split(":")[0]; versioning = new TagVersioning(remoteName.split(":")[1]); } else { repo = remoteName; versioning = new TagVersioning("latest"); } }