package org.opendaylight.yangtools.yang.parser.builder.util;
import com.google.common.base.Preconditions;
+import java.util.Objects;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.model.api.SchemaPath;
import org.opendaylight.yangtools.yang.model.api.Status;
/**
* Basic implementation of SchemaNodeBuilder.
+ *
+ * @deprecated Pre-Beryllium implementation, scheduled for removal.
*/
+@Deprecated
public abstract class AbstractSchemaNodeBuilder extends AbstractBuilder implements SchemaNodeBuilder {
protected final QName qname;
protected SchemaPath schemaPath;
}
@Override
- public void setStatus(Status status) {
+ public void setStatus(final Status status) {
this.status = Preconditions.checkNotNull(status, "status cannot be null");
}
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
- result = prime * result + ((getParent() == null) ? 0 : getParent().hashCode());
- result = prime * result + ((schemaPath == null) ? 0 : schemaPath.hashCode());
+ result = prime * result + Objects.hashCode(getParent());
+ result = prime * result + Objects.hashCode(schemaPath);
return result;
}
@Override
- public boolean equals(Object obj) {
+ public boolean equals(final Object obj) {
if (this == obj) {
return true;
}