public Set<Map.Entry<String,Object>> entrySet() {
    Set<Map.Entry<String, Object>> entries = new LinkedHashSet<Map.Entry<String, Object>>();
    
    for (Map.Entry<String, Object> entry : values.entrySet()) {
      Class<? extends Object> entryClass = entry.getValue().getClass();
      
      if (Map.class.isAssignableFrom(entryClass)) {
        entries.add(new Toml.Entry(entry.getKey(), getTable(entry.getKey())));
      } else if (List.class.isAssignableFrom(entryClass)) {
        List<?> value = (List<?>) entry.getValue();
        if (!value.isEmpty() && value.get(0) instanceof Map) {
          entries.add(new Toml.Entry(entry.getKey(), getTables(entry.getKey())));
        } else {
          entries.add(new Toml.Entry(entry.getKey(), value));
        }
      } else {
        entries.add(new Toml.Entry(entry.getKey(), entry.getValue()));
      }
    }
    
    return entries;
  }
public Set < Map . Entry < String , Object > > entrySet ( ) { Set < Map . Entry < String , Object > > entries = new LinkedHashSet < Map . Entry < String , Object > > ( ) ; for ( Map . Entry < String , Object > entry : values . entrySet ( ) ) { Class < ? extends Object > entryClass = entry . getValue ( ) . getClass ( ) ; if ( Map . class . isAssignableFrom ( entryClass ) ) { entries . add ( new Toml . Entry ( entry . getKey ( ) , getTable ( entry . getKey ( ) ) ) ) ; } else if ( List . class . isAssignableFrom ( entryClass ) ) { List < ? > value = ( List < ? > ) entry . getValue ( ) ; if ( ! value . isEmpty ( ) && value . get ( 0 ) instanceof Map ) { entries . add ( new Toml . Entry ( entry . getKey ( ) , getTables ( entry . getKey ( ) ) ) ) ; } else { entries . add ( new Toml . Entry ( entry . getKey ( ) , value ) ) ; } } else { entries . add ( new Toml . Entry ( entry . getKey ( ) , entry . getValue ( ) ) ) ; } } return entries ; }
@return a {@link Set} of Map.Entry instances. Modifications to the {@link Set} are not reflected in this Toml instance. Entries are immutable, so {@link Map.Entry#setValue(Object)} throws an UnsupportedOperationException.