private static Map<String,SnmpOid> buildPoolIndexMap(SnmpTableHandler handler){
  if (handler instanceof SnmpCachedData)   return buildPoolIndexMap((SnmpCachedData)handler);
  final Map<String,SnmpOid> m=new HashMap<>();
  SnmpOid index=null;
  while ((index=handler.getNext(index)) != null) {
    final MemoryPoolMXBean mpm=(MemoryPoolMXBean)handler.getData(index);
    if (mpm == null)     continue;
    final String name=mpm.getName();
    if (name == null)     continue;
    m.put(name,index);
  }
  return m;
}

private static Map < String , SnmpOid > buildPoolIndexMap ( SnmpTableHandler handler ) { if ( handler instanceof SnmpCachedData ) return buildPoolIndexMap ( ( SnmpCachedData ) handler ) ; final Map < String , SnmpOid > m = new HashMap < > ( ) ; SnmpOid index = null ; while ( ( index = handler . getNext ( index ) ) != null ) { final MemoryPoolMXBean mpm = ( MemoryPoolMXBean ) handler . getData ( index ) ; if ( mpm == null ) continue ; final String name = mpm . getName ( ) ; if ( name == null ) continue ; m . put ( name , index ) ; } return m ; }
builds a map pool - name = > pool - index from the snmptablehandler of the jvmmempooltable .
