|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RowKeyValueConverter<K,V>
Interface to allow custom application-specific Java classes to be used to represent keys and values instead of the default String (for keys) and RowValue classes.
To fulfil the contract of ConcurrentMap it is essential that all key and value objects have valid implementations of equals() and hashCode().
Method Summary | |
---|---|
V |
fromRowValue(RowValue value)
Converts a RowValue object to the custom application-specific object that should be used for values in this table. |
K |
fromStringKey(java.lang.String key)
Converts a string to the application-specific object that should be used for keys in this table. |
RowValue |
toRowValue(V value)
Converts an application-specific row value object to a RowValue. |
java.lang.String |
toStringKey(K key)
Converts an application-specific key object to a string. |
Method Detail |
---|
V fromRowValue(RowValue value)
value
- the row value to convert
RowValue toRowValue(V value)
value
- the row value to convert
K fromStringKey(java.lang.String key)
Most maps use String or Object so there is usually nothing to do but a cast.
key
- the string representation of the key
java.lang.String toStringKey(K key)
If the map is keyed by strings, this should simply return the argument cast to a String.
key
- the key to convert
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |