if (o == null)
return false;
if (o instanceof InternalBindingKey) {
InternalBindingKey that = (InternalBindingKey)o;
// Both lengths must match
if (this.idLen != that.idLen || this.kindLen != that.kindLen) {
return false;
}
// If id is set is must be equal
if (this.idLen > 0 && this.name.id.equals(that.name.id) == false) {
return false;
}
// If kind is set it must be equal
if (this.kindLen > 0 && this.name.kind.equals(that.name.kind) == false) {
return false;
}
// Must be the same
return true;
} else {
return false;
}