protected void initWithPrimitiveTypeArray ( ) { // =========== primitve array type ============== transformers . put ( boolean [ ] . class , new Transformer ( ) { @ Override public SFSDataWrapper transform ( Object value ) { return new SFSDataWrapper ( SFSDataType . BOOL_ARRAY , primitiveArrayToBoolCollection ( ( boolean [ ] ) value ) ) ; } } ) ; transformers . put ( byte [ ] . class , new Transformer ( ) { @ Override public SFSDataWrapper transform ( Object value ) { return new SFSDataWrapper ( SFSDataType . BYTE_ARRAY , value ) ; } } ) ; transformers . put ( char [ ] . class , new Transformer ( ) { @ Override public SFSDataWrapper transform ( Object value ) { return new SFSDataWrapper ( SFSDataType . BYTE_ARRAY , charArrayToByteArray ( ( char [ ] ) value ) ) ; } } ) ; transformers . put ( double [ ] . class , new Transformer ( ) { @ Override public SFSDataWrapper transform ( Object value ) { return new SFSDataWrapper ( SFSDataType . DOUBLE_ARRAY , primitiveArrayToDoubleCollection ( ( double [ ] ) value ) ) ; } } ) ; transformers . put ( float [ ] . class , new Transformer ( ) { @ Override public SFSDataWrapper transform ( Object value ) { return new SFSDataWrapper ( SFSDataType . FLOAT_ARRAY , primitiveArrayToFloatCollection ( ( float [ ] ) value ) ) ; } } ) ; transformers . put ( int [ ] . class , new Transformer ( ) { @ Override public SFSDataWrapper transform ( Object value ) { return new SFSDataWrapper ( SFSDataType . INT_ARRAY , primitiveArrayToIntCollection ( ( int [ ] ) value ) ) ; } } ) ; transformers . put ( long [ ] . class , new Transformer ( ) { @ Override public SFSDataWrapper transform ( Object value ) { return new SFSDataWrapper ( SFSDataType . LONG_ARRAY , primitiveArrayToLongCollection ( ( long [ ] ) value ) ) ; } } ) ; transformers . put ( short [ ] . class , new Transformer ( ) { @ Override public SFSDataWrapper transform ( Object value ) { return new SFSDataWrapper ( SFSDataType . SHORT_ARRAY , primitiveArrayToShortCollection ( ( short [ ] ) value ) ) ; } } ) ; }
Add transformers of array of primitive values to the map