1 package hero.entity; 2 3 24 25 26 import hero.interfaces.BnNodeLocal; 27 28 public abstract class EdgeState implements java.io.Serializable { 29 30 public static EdgeState make(int type) { 31 if(type == hero.interfaces.Constants.Nd.AND_JOIN_NODE) {return new AndEdgeState();} 32 if(type == hero.interfaces.Constants.Nd.OR_JOIN_NODE) {return new OrEdgeState();} 33 if(type == hero.interfaces.Constants.Nd.AND_JOIN_AUTOMATIC_NODE) {return new AndEdgeState();} 34 if(type == hero.interfaces.Constants.Nd.OR_JOIN_AUTOMATIC_NODE) {return new OrEdgeState();} 35 36 return new AndEdgeState(); 37 } 38 39 public abstract int state(BnNodeLocal nd); 40 41 } 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | Popular Tags |