net.sourceforge.hiveutils.util
Interface PrefsMapper


public interface PrefsMapper

Interface used by PreferencesManager to serialize and deserialize specific types of bean properties in order to map it to the preference store. The PreferencesManager knows how to map standard types like int, long, float, double, boolean (and ther non-primitive equivalents) and String.

Example applications might be mapping of Font and Color.

Author:
Jean-Francois Poilpret

Method Summary
 java.lang.Object read(java.lang.String s)
          Maps a string to an actual object (that string was retrieved from the preferences store.
 java.lang.String write(java.lang.Object o)
          Maps the actual object into a string (that string will be then stored to the preferences store.
 

Method Detail

write

java.lang.String write(java.lang.Object o)
Maps the actual object into a string (that string will be then stored to the preferences store.

Parameters:
o - the original object
Returns:
the string to which the object is mapped

read

java.lang.Object read(java.lang.String s)
Maps a string to an actual object (that string was retrieved from the preferences store.

Parameters:
s - the string representing the original object
Returns:
the object mapped from the string