OSDN Git Service

change kgram format
[stigmata/stigmata-plugins.git] / wsp / src / main / java / jp / sourceforge / stigmata / birthmarks / wsp / CurrentDepth.java
1 package jp.sourceforge.stigmata.birthmarks.wsp;
2
3 /**
4  *
5  * @author Haruaki Tamada
6  */
7 public class CurrentDepth{
8     private WSPOpcode opcode;
9     private int depth;
10
11     public CurrentDepth(int depth, WSPOpcode opcode){
12         this.depth = depth;
13         this.opcode = opcode;
14     }
15
16     public int getDepth(){
17         return depth;
18     }
19
20     public WSPOpcode getOpcode(){
21         return opcode;
22     }
23
24     @Override
25     public String toString(){
26         return String.format(
27             "%d:%d:%d:%d", opcode.getOpcode(),
28             depth, opcode.getWeight(), opcode.getAct()
29         );
30     }
31 }