code: public E getBy(String attributeName, String attributeValue) {
          String methodName = "get" + Character.toUpperCase(attributeName.charAt(0)) + attributeName.substring(1);
          for (E element : this)
              if (element != null)
                  try {
                      Object value = element.getClass().getMethod(methodName).invoke(element);
                      if (value == attributeValue || value != null && value.equals(attributeValue))
                          return element;
                  } catch (Exception x) {
                  }
          return null;
      }
docs: Returns the first element in this list with a matching attribute value.
  
  @param attributeName the attribute for which to search (Example: jndiName)
  @param attributeValue the value to match
  @return the first element in this list with a matching attribute name/value, or null of no such element is found