Back to project page latrobe-datacapture-dir.
The source code is released under:
MIT License
If you think the Android project latrobe-datacapture-dir listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.example.DataCaptureApp.transforms; /* w w w .j a v a 2 s . co m*/ import com.example.DataCaptureApp.data.Data; import com.example.DataCaptureApp.data.DataTransform; import java.util.Map; import java.util.Set; /** * Created by Tom on 26/10/2014. */ public class UnpackDataTransform extends DataTransform { private String mUnpackField; public UnpackDataTransform(String unpackField) { mUnpackField = unpackField; } @Override public synchronized Data transform(Data data) { // Attempt to retrieve packed data Data packedData = data.get(mUnpackField); if(packedData != null) { data.remove(mUnpackField); Set<Data.Field> fields = packedData.getFields(); for (Data.Field field : fields) { data.set(field.getKey(), field.getValue()); } } return data; } }