@Test public void testWriteAndReadFields() throws Exception { Properties propertiesIn = Properties.createFromMap(SUPPORTED_PROPERTIES); Properties propertiesOut = writeAndReadFields(Properties.class, propertiesIn); assertEquals(propertiesIn, propertiesOut); }
public static Properties createFromMap(Map<String, Object> map) { Properties properties; if (map == null) { properties = Properties.createWithCapacity(0); } else { properties = Properties.createWithCapacity(map.size()); for (Map.Entry<String, Object> entry : map.entrySet()) { properties.set(entry.getKey(), PropertyValue.create(entry.getValue())); } } return properties; }
Properties implements Iterable<Property>, Value, Serializable { public static Properties createFromMap(Map<String, Object> map) { Properties properties; if (map == null) { properties = Properties.createWithCapacity(0); } else { properties = Properties.createWithCapacity(map.size()); for (Map.Entry<String, Object> entry : map.entrySet()) { properties.set(entry.getKey(), PropertyValue.create(entry.getValue())); } } return properties; } }
Properties implements Iterable<Property>, Value, Serializable { public static Properties createFromMap(Map<String, Object> map) { Properties properties; if (map == null) { properties = Properties.createWithCapacity(0); } else { properties = Properties.createWithCapacity(map.size()); for (Map.Entry<String, Object> entry : map.entrySet()) { properties.set(entry.getKey(), PropertyValue.create(entry.getValue())); } } return properties; } Properties(); private  Properties(int capacity); }
Properties implements Iterable<Property>, Value, Serializable { public static Properties createFromMap(Map<String, Object> map) { Properties properties; if (map == null) { properties = Properties.createWithCapacity(0); } else { properties = Properties.createWithCapacity(map.size()); for (Map.Entry<String, Object> entry : map.entrySet()) { properties.set(entry.getKey(), PropertyValue.create(entry.getValue())); } } return properties; } Properties(); private  Properties(int capacity); static Properties create(); static Properties createWithCapacity(int capacity); static Properties createFromMap(Map<String, Object> map); Iterable<String> getKeys(); boolean containsKey(String key); PropertyValue get(String key); void set(Property property); void set(String key, PropertyValue value); void set(String key, Object value); PropertyValue remove(String key); PropertyValue remove(Property property); void clear(); int size(); boolean isEmpty(); @Override boolean equals(Object o); @Override int hashCode(); @Override Iterator<Property> iterator(); List<Property> toList(); @Override void write(DataOutputView outputView); @Override void read(DataInputView inputView); @Override String toString(); }
Properties implements Iterable<Property>, Value, Serializable { public static Properties createFromMap(Map<String, Object> map) { Properties properties; if (map == null) { properties = Properties.createWithCapacity(0); } else { properties = Properties.createWithCapacity(map.size()); for (Map.Entry<String, Object> entry : map.entrySet()) { properties.set(entry.getKey(), PropertyValue.create(entry.getValue())); } } return properties; } Properties(); private  Properties(int capacity); static Properties create(); static Properties createWithCapacity(int capacity); static Properties createFromMap(Map<String, Object> map); Iterable<String> getKeys(); boolean containsKey(String key); PropertyValue get(String key); void set(Property property); void set(String key, PropertyValue value); void set(String key, Object value); PropertyValue remove(String key); PropertyValue remove(Property property); void clear(); int size(); boolean isEmpty(); @Override boolean equals(Object o); @Override int hashCode(); @Override Iterator<Property> iterator(); List<Property> toList(); @Override void write(DataOutputView outputView); @Override void read(DataInputView inputView); @Override String toString();  }