/** * Compare variable name for equality. Blank node is not used in the * comparison. * * @param obj The object to compare against. * @return True if the objects have the same variable name. */ public boolean equals(Object obj) { boolean returnValue = false; // Object must not be null if (obj != null) { try { VariableNodeImpl tmpNode = (VariableNodeImpl) obj; // Ensure that both data type URIs are null or are equal by their // string values. if (getVariableName().equals(tmpNode.getVariableName())) { returnValue = true; } } catch (ClassCastException cce) { // Leave return value to be false. } } return returnValue; }