@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSolutionStacks() == null) ? 0 : getSolutionStacks().hashCode()); hashCode = prime * hashCode + ((getSolutionStackDetails() == null) ? 0 : getSolutionStackDetails().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ListAvailableSolutionStacksResult == false) return false; ListAvailableSolutionStacksResult other = (ListAvailableSolutionStacksResult) obj; if (other.getSolutionStacks() == null ^ this.getSolutionStacks() == null) return false; if (other.getSolutionStacks() != null && other.getSolutionStacks().equals(this.getSolutionStacks()) == false) return false; if (other.getSolutionStackDetails() == null ^ this.getSolutionStackDetails() == null) return false; if (other.getSolutionStackDetails() != null && other.getSolutionStackDetails().equals(this.getSolutionStackDetails()) == false) return false; return true; }
/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getSolutionStacks() != null) sb.append("SolutionStacks: ").append(getSolutionStacks()).append(","); if (getSolutionStackDetails() != null) sb.append("SolutionStackDetails: ").append(getSolutionStackDetails()); sb.append("}"); return sb.toString(); }
private void getLatestStackSolutionVersion() { ListAvailableSolutionStacksResult response = beanstalkClient.listAvailableSolutionStacks(); for (int i = 0; i < response.getSolutionStacks().size(); i++) { if (response.getSolutionStacks().get(i).contains("Java 8") { stackName = response.getSolutionStacks().get(i); break; } } }
public String findSolutionStack(String name) { ListAvailableSolutionStacksResult list = beanstalkClient.listAvailableSolutionStacks(); for (String s : list.getSolutionStacks()) { if (s.contains(name)) { return s; } } return ""; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSolutionStacks() == null) ? 0 : getSolutionStacks().hashCode()); hashCode = prime * hashCode + ((getSolutionStackDetails() == null) ? 0 : getSolutionStackDetails().hashCode()); return hashCode; }
public String latestSolutionStackName(String os, String platform) { ListAvailableSolutionStacksResult lassr = getClient().listAvailableSolutionStacks(); return lassr.getSolutionStacks().stream() .filter(n -> n.startsWith(os) && n.contains(" running " + platform)) .findFirst() .orElse(null); } }
/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getSolutionStacks() != null) sb.append("SolutionStacks: ").append(getSolutionStacks()).append(","); if (getSolutionStackDetails() != null) sb.append("SolutionStackDetails: ").append(getSolutionStackDetails()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ListAvailableSolutionStacksResult == false) return false; ListAvailableSolutionStacksResult other = (ListAvailableSolutionStacksResult) obj; if (other.getSolutionStacks() == null ^ this.getSolutionStacks() == null) return false; if (other.getSolutionStacks() != null && other.getSolutionStacks().equals(this.getSolutionStacks()) == false) return false; if (other.getSolutionStackDetails() == null ^ this.getSolutionStackDetails() == null) return false; if (other.getSolutionStackDetails() != null && other.getSolutionStackDetails().equals(this.getSolutionStackDetails()) == false) return false; return true; }