private boolean checkAnnotations(List<CsdlAnnotation> csdlCastAnnotations) { if (csdlCastAnnotations == null) { return false; } if (this.getAnnotations().size() == csdlCastAnnotations.size()) { for (int i = 0; i < this.getAnnotations().size(); i++) { if (!this.getAnnotations().get(i).equals(csdlCastAnnotations.get(i))) { return false; } } } else { return false; } return true; }
@Override public boolean equals (Object obj) { if (obj == null) { return false; } if (!(obj instanceof CsdlCast)) { return false; } CsdlCast csdlCast = (CsdlCast) obj; return (this.getValue() == null ? csdlCast.getValue() == null : this.getValue().equals(csdlCast.getValue())) && (this.getType() == null ? csdlCast.getType() == null : this.getType().equals(csdlCast.getType())) && (this.getMaxLength() == null ? csdlCast.getMaxLength() == null : this.getMaxLength().equals(csdlCast.getMaxLength())) && (this.getPrecision() == null ? csdlCast.getPrecision() == null : this.getPrecision().equals(csdlCast.getPrecision())) && (this.getScale() == null ? csdlCast.getScale() == null : this.getScale().equals(csdlCast.getScale())) && (this.getSrid() == null ? csdlCast.getSrid() == null : String.valueOf(this.getSrid()).equals(String.valueOf(csdlCast.getSrid()))) && (this.getAnnotations() == null ? csdlCast.getAnnotations() == null : checkAnnotations(csdlCast.getAnnotations())); }