(successful);
}
/**
* List of successful operations
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setSuccessful(java.util.Collection)} or {@link #withSuccessful(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param successful
* List of successful operations
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BatchStartResult withSuccessful(BatchSuccessfulResultModel... successful) {
if (this.successful == null) {
setSuccessful(new java.util.ArrayList(successful.length));
}
for (BatchSuccessfulResultModel ele : successful) {
this.successful.add(ele);
}
return this;
}
/**
* List of successful operations
*
* @param successful
* List of successful operations
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BatchStartResult withSuccessful(java.util.Collection successful) {
setSuccessful(successful);
return this;
}
/**
* 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 (getFailed() != null)
sb.append("Failed: ").append(getFailed()).append(",");
if (getSuccessful() != null)
sb.append("Successful: ").append(getSuccessful());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof BatchStartResult == false)
return false;
BatchStartResult other = (BatchStartResult) obj;
if (other.getFailed() == null ^ this.getFailed() == null)
return false;
if (other.getFailed() != null && other.getFailed().equals(this.getFailed()) == false)
return false;
if (other.getSuccessful() == null ^ this.getSuccessful() == null)
return false;
if (other.getSuccessful() != null && other.getSuccessful().equals(this.getSuccessful()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getFailed() == null) ? 0 : getFailed().hashCode());
hashCode = prime * hashCode + ((getSuccessful() == null) ? 0 : getSuccessful().hashCode());
return hashCode;
}
@Override
public BatchStartResult clone() {
try {
return (BatchStartResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}