@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; HttpLocalizedOperationResult that = (HttpLocalizedOperationResult) o; if (httpCode != that.httpCode) return false; if (healthStateType != null ? !healthStateType.equals(that.healthStateType) : that.healthStateType != null) return false; if (message != null ? !message.equals(that.message) : that.message != null) return false; return true; }
private boolean equals(ServerHealthState that) { if (!this.healthStateLevel.equals(that.healthStateLevel)) { return false; } if (!this.type.equals(that.type)) { return false; } if (!this.description.equals(that.description)) { return false; } if (!this.message.equals(that.message)) { return false; } return true; }
public boolean containsError(HealthStateType type, HealthStateLevel level) { ServerHealthStates allLogs = logs(); for (ServerHealthState log : allLogs) { if (log.getType().equals(type) && log.getLogLevel() == level) { return true; } } return false; }
public boolean matchesSafely(ServerHealthService item) { for (ServerHealthState serverHealthState : item.logs()) { if (serverHealthState.getType().equals(healthStateType)) { entry = serverHealthState; return false; } } return true; }
public boolean matchesSafely(ServerHealthService item) { allLogs = item.logs(); for (ServerHealthState serverHealthState : allLogs) { if (serverHealthState.getType().equals(healthStateType)) { entry = serverHealthState; } } if (!(entry != null)) { return false; } else { levelMatches = healthStateLevel == null || healthStateLevel.equals(entry.getLogLevel()); messageMatches = message == null || message.equals(entry.getMessage()); return levelMatches && messageMatches; } }