public boolean containsElement(ElementType elementType) { if (type.equals(elementType) || (leftChild != null && leftChild.containsElement(elementType)) || (rightChild != null && rightChild.containsElement(elementType))) { return true; } return false; }
/** * Returns <CODE>true</CODE> if Element is a halogen (F, Cl, Br, I, At). * * @return <CODE>true</CODE> if Element is a halogen. */ public boolean isHalogen() { return elementType.equals(ElementType.HALOGEN); }