@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + (latitudeRole != null ? latitudeRole.hashCode() : 0); result = 31 * result + (longitudeRole != null ? longitudeRole.hashCode() : 0); return result; }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } if (!super.equals(o)) { return false; } LocationRole that = (LocationRole) o; if (latitudeRole != null ? !latitudeRole.equals(that.latitudeRole) : that.latitudeRole != null) { return false; } if (longitudeRole != null ? !longitudeRole.equals(that.longitudeRole) : that.longitudeRole != null) { return false; } return true; }
public String getPrefix() { if (latitudeRole != null && longitudeRole != null) { String prefix = latitudeRole.getPrefix(); if (prefix.equalsIgnoreCase(longitudeRole.getPrefix())) { return prefix; } } return ""; }
@Override public boolean evaluate(String fieldName) { boolean result = false; if (latitudeRole != null) { result = latitudeRole.evaluate(fieldName); if (result) { return result; } } if (longitudeRole != null) { return result || longitudeRole.evaluate(fieldName); } return result; }
public boolean evaluateLongitude(String fieldName) { if (longitudeRole != null) { return longitudeRole.evaluate(fieldName); } return false; }