// Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
// 
//     private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
// 
//     private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
// 
//     public static void register(Object object) {
//         TARGET_CENTER.register(object);
//     }
// 
//     public static boolean isRegistered(Object object) {
//         return TARGET_CENTER.isRegistered(object);
//     }
// 
//     public static void unregister(Object object) {
//         TARGET_CENTER.unregister(object);
//     }
// 
//     public static <T> Domino<T, T> createDomino(Object label) {
//         return new Domino<T, T>(label);
//     }
// 
//     public static <T> Domino<T, T> createAnonymousDomino() {
//         return createDomino(null);
//     }
// 
//     @SafeVarargs
//     public static <T> void playDomino(Object label, T... input) {
//         CopyOnWriteArrayList<T> newInput = new CopyOnWriteArrayList<T>();
//         if (input == null) {
//             newInput.add(null);
//         } else if (input.length > 0) {
//             newInput.addAll(Arrays.asList(input));
//         }
//         playDominoInternal(label, newInput);
//     }
// 
//     public static void playDomino(Object label) {
//         playDominoInternal(label, new CopyOnWriteArrayList<Object>());
//     }
// 
//     private static <T> void playDominoInternal(Object label, CopyOnWriteArrayList<T> input) {
//         DOMINO_CENTER.play(label, input);
//     }
// 
//     public static <T, R> Domino<T, R> getDominoByLabel(Object label) {
//         return DOMINO_CENTER.getDomino(label);
//     }
// }
// 
// Path: shelly/src/main/java/xiaofei/library/shelly/function/stashfunction/StashAction0.java
// public abstract class StashAction0 extends StashAction implements Action0 {
// }
// 
// Path: shelly/src/main/java/xiaofei/library/shelly/function/stashfunction/StashAction1.java
// public abstract class StashAction1<T> extends StashAction implements Action1<T> {
// }


import xiaofei.library.shelly.function.stashfunction.StashAction1;
import org.junit.Test;
import xiaofei.library.shelly.Shelly;
import xiaofei.library.shelly.function.stashfunction.StashAction0;
/**
 *
 * Copyright 2016 Xiaofei
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

package xiaofei.library.shelly.domino;



/**
 * Created by Xiaofei on 16/7/19.
 */
public class Test08 {

    @Test
    public void testMap() {
        Shelly.<String>createDomino(1)
// Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
// 
//     private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
// 
//     private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
// 
//     public static void register(Object object) {
//         TARGET_CENTER.register(object);
//     }
// 
//     public static boolean isRegistered(Object object) {
//         return TARGET_CENTER.isRegistered(object);
//     }
// 
//     public static void unregister(Object object) {
//         TARGET_CENTER.unregister(object);
//     }
// 
//     public static <T> Domino<T, T> createDomino(Object label) {
//         return new Domino<T, T>(label);
//     }
// 
//     public static <T> Domino<T, T> createAnonymousDomino() {
//         return createDomino(null);
//     }
// 
//     @SafeVarargs
//     public static <T> void playDomino(Object label, T... input) {
//         CopyOnWriteArrayList<T> newInput = new CopyOnWriteArrayList<T>();
//         if (input == null) {
//             newInput.add(null);
//         } else if (input.length > 0) {
//             newInput.addAll(Arrays.asList(input));
//         }
//         playDominoInternal(label, newInput);
//     }
// 
//     public static void playDomino(Object label) {
//         playDominoInternal(label, new CopyOnWriteArrayList<Object>());
//     }
// 
//     private static <T> void playDominoInternal(Object label, CopyOnWriteArrayList<T> input) {
//         DOMINO_CENTER.play(label, input);
//     }
// 
//     public static <T, R> Domino<T, R> getDominoByLabel(Object label) {
//         return DOMINO_CENTER.getDomino(label);
//     }
// }
// 
// Path: shelly/src/main/java/xiaofei/library/shelly/function/stashfunction/StashAction0.java
// public abstract class StashAction0 extends StashAction implements Action0 {
// }
// 
// Path: shelly/src/main/java/xiaofei/library/shelly/function/stashfunction/StashAction1.java
// public abstract class StashAction1<T> extends StashAction implements Action1<T> {
// }


// Path: shelly/src/test/java/xiaofei/library/shelly/domino/Test08.java
import xiaofei.library.shelly.function.stashfunction.StashAction1;
import org.junit.Test;
import xiaofei.library.shelly.Shelly;
import xiaofei.library.shelly.function.stashfunction.StashAction0;

/**
 *
 * Copyright 2016 Xiaofei
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

package xiaofei.library.shelly.domino;



/**
 * Created by Xiaofei on 16/7/19.
 */
public class Test08 {

    @Test
    public void testMap() {
        Shelly.<String>createDomino(1)
                .perform(new StashAction0() {