Пример #1
0
 public boolean containsElement(ElementType elementType) {
   if (type.equals(elementType)
       || (leftChild != null && leftChild.containsElement(elementType))
       || (rightChild != null && rightChild.containsElement(elementType))) {
     return true;
   }
   return false;
 }
Пример #2
0
 /**
  * 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);
 }