if (o == null)
return false;
if (o instanceof InternalBindingKey) {
InternalBindingKey that = (InternalBindingKey)o;
if( this.id != null && that.id != null )
{
if (this.id.length() != that.id.length() )
{
return false;
}
// If id is set is must be equal
if (this.id.length() > 0 && this.id.equals(that.id) == false)
{
return false;
}
}
else
{
// If One is Null and the other is not then it's a mismatch
// So, return false
if( ( this.id == null && that.id != null )
|| ( this.id !=null && that.id == null ) )
{
return false;
}
}
if( this.kind != null && that.kind != null )
{
if (this.kind.length() != that.kind.length() )
{
return false;
}
// If kind is set it must be equal
if (this.kind.length() > 0 && this.kind.equals(that.kind) == false)
{
return false;
}
}
else
{
// If One is Null and the other is not then it's a mismatch
// So, return false
if( ( this.kind == null && that.kind != null )
|| ( this.kind !=null && that.kind == null ) )
{
return false;
}
}
// We have checked all the possibilities, so return true
return true;
} else {
return false;
}