code: public E removeBy(String attributeName, String attributeValue) {
          // traverses the list twice, but reuse code
          E element = this.getBy(attributeName, attributeValue);
          if (element != null) {
              this.remove(element); // this should always return true since we already found the element
          }
          return element;
      }
docs: Removes the first element in this list with a matching attribute name/value
  
  @param attributeName the attribute for which to search (Example: jndiName)
  @param attributeValue the value to match
  @return the removed element, or null of no element was removed