@@ -0,0 +1,1121 @@
+package com.uxxu.konashi.lib.dispatcher;%0A%0Aimport android.bluetooth.BluetoothGattCharacteristic;%0A%0Aimport com.uxxu.konashi.lib.stores.Store;%0A%0Aimport org.jdeferred.DoneCallback;%0A%0Aimport java.util.UUID;%0A%0A/**%0A * Created by izumin on 9/18/15.%0A */%0Apublic class CharacteristicDispatcher%3CS extends Store, T extends Enum%3CT%3E & CharacteristicDispatcher.Updater%3CS%3E%3E implements DoneCallback%3CBluetoothGattCharacteristic%3E %7B%0A    interface Updater%3CS%3E %7B%0A        void update(S store, byte%5B%5D value);%0A        UUID getUuid();%0A    %7D%0A%0A    private S mStore;%0A    private final Class%3CT%3E mTypeClass;%0A%0A    public CharacteristicDispatcher(Class%3CT%3E typeClass) %7B%0A        mTypeClass = typeClass;%0A    %7D%0A%0A    public void setStore(S store) %7B%0A        mStore = store;%0A    %7D%0A%0A    private Updater%3CS%3E valueOf(UUID uuid) %7B%0A        for (Updater%3CS%3E type : mTypeClass.getEnumConstants()) %7B%0A            if (type.getUuid().equals(uuid)) %7B return type; %7D%0A        %7D%0A        throw new IllegalArgumentException();%0A    %7D%0A%0A    @Override%0A    public void onDone(BluetoothGattCharacteristic result) %7B%0A        valueOf(result.getUuid()).update(mStore, result.getValue());%0A    %7D%0A%7D%0A

Add CharacteristicDispatcher and Updater