return false;
}
NodeWrappedType nodeWrappedType = (NodeWrappedType) obj;
- if (!wrappedType.equals(nodeWrappedType.wrappedType)) {
- return false;
- }
- return true;
+ return wrappedType.equals(nodeWrappedType.wrappedType);
}
@Override
if (this == obj) {
return true;
}
- if (obj == null) {
- return false;
- }
- if (getClass() != obj.getClass()) {
+ if (obj == null || getClass() != obj.getClass()) {
return false;
}
final AbstractTypeMemberBuilder<?> other = (AbstractTypeMemberBuilder<?>) obj;
@Override
public String toString() {
- final StringBuilder builder = new StringBuilder();
- builder.append("GeneratedPropertyImpl [name=");
- builder.append(getName());
- builder.append(", annotations=");
- builder.append(getAnnotationBuilders());
- builder.append(", comment=");
- builder.append(getComment());
- builder.append(", returnType=");
- builder.append(getReturnType());
- builder.append(", isFinal=");
- builder.append(isFinal());
- builder.append(", modifier=");
- builder.append(getAccessModifier());
- builder.append("]");
- return builder.toString();
+ return new StringBuilder().append("GeneratedPropertyImpl [name=").append(getName())
+ .append(", annotations=").append(getAnnotationBuilders())
+ .append(", comment=").append(getComment())
+ .append(", returnType=").append(getReturnType())
+ .append(", isFinal=").append(isFinal())
+ .append(", modifier=").append(getAccessModifier())
+ .append(']').toString();
}
}
if (this == obj) {
return true;
}
- if (obj == null) {
- return false;
- }
- if (getClass() != obj.getClass()) {
+ if (obj == null || getClass() != obj.getClass()) {
return false;
}
final MethodSignatureBuilderImpl other = (MethodSignatureBuilderImpl) obj;
- if (!Objects.equals(getName(), other.getName())) {
- return false;
- }
- if (!Objects.equals(this.parameters, other.parameters)) {
- return false;
- }
- if (!Objects.equals(getReturnType(), other.getReturnType())) {
- return false;
- }
- return true;
+ return Objects.equals(getName(), other.getName())
+ && Objects.equals(this.parameters, other.parameters)
+ && Objects.equals(getReturnType(), other.getReturnType());
}
@Override
public String toString() {
- final StringBuilder builder = new StringBuilder();
- builder.append("MethodSignatureBuilderImpl [name=");
- builder.append(getName());
- builder.append(", returnType=");
- builder.append(getReturnType());
- builder.append(", parameters=");
- builder.append(this.parameters);
- builder.append(", annotationBuilders=");
- builder.append(getAnnotationBuilders());
- builder.append(", comment=");
- builder.append(getComment());
- builder.append("]");
- return builder.toString();
+ return new StringBuilder().append("MethodSignatureBuilderImpl [name=").append(getName())
+ .append(", returnType=").append(getReturnType())
+ .append(", parameters=").append(this.parameters)
+ .append(", annotationBuilders=").append(getAnnotationBuilders())
+ .append(", comment=").append(getComment())
+ .append(']').toString();
}
}
import org.opendaylight.mdsal.binding.model.api.Type;
class MethodSignatureImpl extends AbstractTypeMember implements MethodSignature {
-
private final List<Parameter> params;
private final boolean isAbstract;
private final boolean isDefault;
if (this == obj) {
return true;
}
- if (obj == null) {
- return false;
- }
- if (getClass() != obj.getClass()) {
+ if (obj == null || getClass() != obj.getClass()) {
return false;
}
final MethodSignatureImpl other = (MethodSignatureImpl) obj;
- if (!Objects.equals(getName(), other.getName())) {
- return false;
- }
- if (!Objects.equals(this.params, other.params)) {
- return false;
- }
- if (!Objects.equals(getReturnType(), other.getReturnType())) {
- return false;
- }
- return true;
+ return Objects.equals(getName(), other.getName())
+ && Objects.equals(this.params, other.params)
+ && Objects.equals(getReturnType(), other.getReturnType());
}
@Override
public String toString() {
- final StringBuilder builder = new StringBuilder();
- builder.append("MethodSignatureImpl [name=");
- builder.append(getName());
- builder.append(", comment=");
- builder.append(getComment());
- if (getDefiningType() != null) {
- builder.append(", definingType=");
- builder.append(getDefiningType().getPackageName());
- builder.append(".");
- builder.append(getDefiningType().getName());
+ final StringBuilder builder = new StringBuilder().append("MethodSignatureImpl [name=").append(getName())
+ .append(", comment=").append(getComment())
+ .append(", definingType=");
+
+ final Type defType = getDefiningType();
+ if (defType != null) {
+ builder.append(defType.getPackageName()).append('.').append(defType.getName());
} else {
- builder.append(", definingType= null");
+ builder.append(" null");
}
- builder.append(", returnType=");
- builder.append(getReturnType());
- builder.append(", params=");
- builder.append(this.params);
- builder.append(", annotations=");
- builder.append(getAnnotations());
- builder.append("]");
- return builder.toString();
+
+ return builder.append(", returnType=").append(getReturnType())
+ .append(", params=").append(this.params)
+ .append(", annotations=").append(getAnnotations())
+ .append(']').toString();
}
}
return type;
}
- @SuppressWarnings("unchecked")
@Override
public boolean equals(final Object obj) {
if (this == obj) {
return true;
}
-
if (obj == null || getClass() != obj.getClass()) {
return false;
}
-
- GenericEntity<T> entity = (GenericEntity<T>) obj;
-
- if (!id.equals(entity.id)) {
- return false;
- }
-
- if (!type.equals(entity.type)) {
- return false;
- }
-
- return true;
+ final GenericEntity<?> entity = (GenericEntity<?>) obj;
+ return id.equals(entity.id) && type.equals(entity.type);
}
@Override