@Test public void testJobId() { final JobId jobId = new JobId("clustername", 10); final String idString1 = jobId.toString(); final Optional<JobId> fromId = JobId.fromId(idString1); assert(fromId.isPresent()); assertEquals(jobId, fromId.get()); final String idString2 = jobId.getId(); final Optional<JobId> fromId2 = JobId.fromId(idString2); assert(fromId2.isPresent()); assertEquals(jobId, fromId2.get()); }
@JsonCreator @JsonIgnoreProperties(ignoreUnknown = true) public JobId(@JsonProperty("clusterName") final String clusterName, @JsonProperty("jobNum") final long jobNum) { this.cluster = clusterName; this.jobNum = jobNum; this.id = clusterName + DELIMITER + jobNum; }
JobId implements Comparable<JobId> { @JsonCreator @JsonIgnoreProperties(ignoreUnknown = true) public JobId(@JsonProperty("clusterName") final String clusterName, @JsonProperty("jobNum") final long jobNum) { this.cluster = clusterName; this.jobNum = jobNum; this.id = clusterName + DELIMITER + jobNum; } }
JobId implements Comparable<JobId> { @JsonCreator @JsonIgnoreProperties(ignoreUnknown = true) public JobId(@JsonProperty("clusterName") final String clusterName, @JsonProperty("jobNum") final long jobNum) { this.cluster = clusterName; this.jobNum = jobNum; this.id = clusterName + DELIMITER + jobNum; } @JsonCreator @JsonIgnoreProperties(ignoreUnknown = true)  JobId(@JsonProperty("clusterName") final String clusterName,
                 @JsonProperty("jobNum") final long jobNum); }
JobId implements Comparable<JobId> { @JsonCreator @JsonIgnoreProperties(ignoreUnknown = true) public JobId(@JsonProperty("clusterName") final String clusterName, @JsonProperty("jobNum") final long jobNum) { this.cluster = clusterName; this.jobNum = jobNum; this.id = clusterName + DELIMITER + jobNum; } @JsonCreator @JsonIgnoreProperties(ignoreUnknown = true)  JobId(@JsonProperty("clusterName") final String clusterName,
                 @JsonProperty("jobNum") final long jobNum); static Optional<JobId> fromId(final String id); String getCluster(); long getJobNum(); String getId(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); @Override int compareTo(JobId o); }
JobId implements Comparable<JobId> { @JsonCreator @JsonIgnoreProperties(ignoreUnknown = true) public JobId(@JsonProperty("clusterName") final String clusterName, @JsonProperty("jobNum") final long jobNum) { this.cluster = clusterName; this.jobNum = jobNum; this.id = clusterName + DELIMITER + jobNum; } @JsonCreator @JsonIgnoreProperties(ignoreUnknown = true)  JobId(@JsonProperty("clusterName") final String clusterName,
                 @JsonProperty("jobNum") final long jobNum); static Optional<JobId> fromId(final String id); String getCluster(); long getJobNum(); String getId(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); @Override int compareTo(JobId o);  }