cdm/src/main/java/ucar/util/prefs/PreferencesExt.java
public void putBeanObject(String key, Object newValue) {
      // if matches a stored Default, dont store
      Object oldValue = getBean(key, null);
      if ((oldValue == null) || !oldValue.equals( newValue))
        keyValues.put( key, newValue);
    }
public void putBeanObject(String key, Object newValue) {
      // if matches a stored Default, dont store
      Object oldValue = getBean(key, null);
      if ((oldValue == null) || !oldValue.equals( newValue))
        keyValues.put( key, newValue);
    }
public void putBeanObject ( String key , Object newValue ) { // if matches a stored Default, dont store Object oldValue = getBean ( key , null ) ; if ( ( oldValue == null ) || ! oldValue . equals ( newValue ) ) keyValues . put ( key , newValue ) ; }
Stores an object using XMLEncoder/XMLDecoder. Use this for arbitrary objects.
If the exact key and value are already in
the storedDefaults (using equals() to test for equality), then it is not
stored.

@param key key with which the specified value is to be associated.
@param newValue store this bean object.
@throws NullPointerException if key or value is <tt>null</tt>.
@throws IllegalStateException if this node (or an ancestor) has been
removed with the {@link #removeNode()} method.
Stores an object using XMLEncoder / XMLDecoder . Use this for arbitrary objects . If the exact key and value are already in the storedDefaults ( using equals () to test for equality ) then it is not stored .