com.distelli.cred.CredPair Maven / Gradle / Ivy
package com.distelli.cred;
import java.util.Arrays;
import java.util.Objects;
public class CredPair {
protected String keyId = null;
protected String secret = null;
public void setKeyId(String keyId)
{
this.keyId = keyId;
}
public String getKeyId()
{
return this.keyId;
}
public CredPair withKeyId(String keyId)
{
this.keyId = keyId;
return this;
}
public void setSecret(String secret)
{
this.secret = secret;
}
public String getSecret()
{
return this.secret;
}
public CredPair withSecret(String secret)
{
this.secret = secret;
return this;
}
@Override
public String toString() {
return String.format("CredPair[keyId=%s, secret=%s]", keyId, secret);
}
@Override
public boolean equals(Object obj) {
if ( null == obj || ! getClass().equals(obj.getClass()) ) return false;
CredPair other = (CredPair)obj;
return Objects.deepEquals(keyId, other.keyId) &&
Objects.deepEquals(secret, other.secret);
}
@Override
public int hashCode() {
return Arrays.deepHashCode(new Object[]{keyId, secret});
}
}