List of usage examples for java.util Objects equals
public static boolean equals(Object a, Object b)
From source file:com.haulmont.cuba.core.sys.encryption.Md5EncryptionModule.java
@Override public boolean checkPassword(User user, String password) { return Objects.equals(user.getPassword(), password); }
From source file:com.okta.sdk.models.log.LogIssuer.java
@Override public boolean equals(Object obj) { if (this == obj) { return true; }// w w w .j a v a 2s .c o m if (obj == null || !(obj instanceof LogIssuer)) { return false; } final LogIssuer other = (LogIssuer) obj; return Objects.equals(this.id, other.id) && Objects.equals(this.type, other.type); }
From source file:com.app.domain.Book.java
@Override public boolean equals(Object obj) { if (obj == null) { return false; }/*w w w . jav a 2s.c o m*/ if (getClass() != obj.getClass()) { return false; } final Book other = (Book) obj; if (!Objects.equals(this.id, other.id)) { return false; } if (!Objects.equals(this.bookname, other.bookname)) { return false; } if (!Objects.equals(this.author, other.author)) { return false; } return true; }
From source file:io.gravitee.management.model.monitoring.MonitoringCPU.java
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof MonitoringCPU)) return false; MonitoringCPU that = (MonitoringCPU) o; return percentUse == that.percentUse && Objects.equals(loadAverage, that.loadAverage); }
From source file:com.github.tomakehurst.wiremock.matching.EqualToPattern.java
@Override public MatchResult match(final String value) { return new MatchResult() { @Override// w w w .ja va 2 s. c om public boolean isExactMatch() { return shouldMatchCaseInsensitive() ? value != null && value.equalsIgnoreCase(expectedValue) : Objects.equals(expectedValue, value); } @Override public double getDistance() { return normalisedLevenshteinDistance(expectedValue, value); } }; }
From source file:com.cloud.agent.api.guru.TrashNetworkVspCommand.java
@Override public boolean equals(Object o) { if (this == o) { return true; }//from w w w. j av a 2 s. com if (!(o instanceof TrashNetworkVspCommand)) { return false; } TrashNetworkVspCommand that = (TrashNetworkVspCommand) o; return super.equals(that) && Objects.equals(_network, that._network); }
From source file:com.okta.sdk.models.log.LogGeolocation.java
@Override public boolean equals(Object obj) { if (this == obj) { return true; }/*from w w w .j av a2 s. co m*/ if (obj == null || !(obj instanceof LogGeolocation)) { return false; } final LogGeolocation other = (LogGeolocation) obj; return Objects.equals(this.lat, other.lat) && Objects.equals(this.lon, other.lon); }
From source file:pl.lodz.p.edu.ftims.poi.poi.entities.History.java
@Override public boolean equals(Object obj) { if (obj == null) { return false; }// w w w.j ava 2 s . co m if (getClass() != obj.getClass()) { return false; } final History other = (History) obj; return Objects.equals(this.ID, other.ID); }
From source file:xyz.cloudbans.entities.data.PlayerName.java
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof PlayerName)) return false; PlayerName that = (PlayerName) o;// w w w . j ava 2 s .com return Objects.equals(getName(), that.getName()) && Objects.equals(getSince(), that.getSince()); }
From source file:com.okta.sdk.models.log.LogOutcome.java
@Override public boolean equals(Object obj) { if (this == obj) { return true; }//from ww w . ja v a 2 s . c o m if (obj == null || !(obj instanceof LogOutcome)) { return false; } final LogOutcome other = (LogOutcome) obj; return Objects.equals(this.result, other.result) && Objects.equals(this.reason, other.reason); }