/** * Method buildProperties returns a new {@link Properties} instance with all property values for this type. * <p> * If no values have been set, all default properties and values will be returned. * * @return a new Properties instance */ public Properties buildProperties() { return buildProperties( (Properties) null ); }
public ConfigDef setProperties( ConfigDef configDef ) { return setProperties( configDef, ConfigDef.Mode.REPLACE ); }
/** * Method buildProperties returns a new {@link Properties} instance with all property values for this type * using the given Properties instance of property values as defaults. The given Map will not be modified. * <p> * If no values have been set, all default properties and values will be returned. * * @return a new Properties instance */ public Properties buildProperties( Properties defaultProperties ) { defaultProperties = defaultProperties != null ? new Properties( defaultProperties ) : new Properties(); addPropertiesTo( defaultProperties ); return defaultProperties; }
/** * Method buildProperties returns a new {@link Properties} instance with all property values for this type * using the given Iterable<Map.Entry<String, String>> of property values as defaults. The given Iterable will not be modified. * <p> * If no values have been set, all default properties and values will be returned. * * @return a new Properties instance */ public Properties buildProperties( Iterable<Map.Entry<String, String>> defaultProperties ) { return buildProperties( PropertyUtil.createProperties( defaultProperties ) ); }
/** * Method buildProperties returns a new {@link Properties} instance with all property values for this type * using the given Map of property values as defaults. The given Map will not be modified. * <p> * If no values have been set, all default properties and values will be returned. * * @return a new Properties instance */ public Properties buildProperties( Map<Object, Object> defaultProperties ) { return buildProperties( PropertyUtil.createProperties( defaultProperties, null ) ); }
public ConfigDef setProperties( ConfigDef configDef, ConfigDef.Mode mode ) { Properties properties = buildProperties(); for( String name : properties.stringPropertyNames() ) configDef.setProperty( mode, name, properties.getProperty( name ) ); return configDef; }