code: public MemoryPoolMXBean getMemoryPoolMXBean(String[] names) {
          for (String name : names) {
              MemoryPoolMXBean bean = getMemoryPoolMXBean(name);
              if (bean != null) { return bean; }
          }
          
          return null;
      }
docs: Get the {@link MemoryPoolMXBean} with one of the given names. The first
  matching memory pool is returned. If no memory pool exists for the given
  names, then <code>null</code> is returned.
  
  @param names The names of the memory pools to search
  
  @return The associated memory pool or <code>null</code>
  
  @see #getMemoryPoolMXBeans()