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.data; /*w w w .jav a 2s . com*/ /** * Created by Tom on 6/09/2014. */ public class DataTransform implements IDataTransform, IDataSource, IDataListener { protected IDataListener mDataListener; @Override public synchronized Data transform(Data dp) { return dp; } @Override public synchronized Data[] transform(Data... dps) { for(Data d : dps) d = transform(d); return dps; } @Override public void onData(IDataSource source, Data data) { data = transform(data); if(data != null) mDataListener.onData(source, data); // Use local source to appear transparent } @Override public void setDataListener(IDataListener listener) { mDataListener = listener; } public static void pipeline(DataTransform... transforms) { DataTransform prev = null; for(DataTransform current : transforms) { if(prev != null) prev.setDataListener(current); prev = current; } } }