view src/main/java/alice/test/topology/aquarium/TakePnum.java @ 655:1c93e82e05c6 default tip

fix timestamp
author suruga
date Sat, 17 Feb 2018 00:33:00 +0900
parents 6e304a7a60e7
children e91a574b69de
line wrap: on
line source

package alice.test.topology.aquarium;

import alice.codesegment.CodeSegment;
import alice.datasegment.CommandType;
import alice.datasegment.Receiver;

public class TakePnum extends CodeSegment {
    // this CodeSegment has bug

    private Receiver pnum = ids.create(CommandType.TAKE);
    private Receiver mynum;

    public TakePnum(Receiver data){
        this.pnum.setKey("parent", "num");
        this.mynum = data;
    }

    @Override
    public void run() {
        ods.update("parent", "num",
                this.pnum.asInteger()+this.mynum.asInteger());
    }

}