code: def enumeration_to_list(enm):
      
      result = []
      while javabridge.call(enm, "hasMoreElements", "()Z"):
          result.append(javabridge.call(enm, "nextElement", "()Ljava/lang/Object;"))
      return result
docs: Turns the java.util.Enumeration into a list.
  
      :param enm: the enumeration to convert
      :type enm: JB_Object
      :return: the list
      :rtype: list