1 17 18 package SOFA.SOFAnode.Util.DFSRChecker.state; 19 20 24 public class Signature extends BitList { 25 28 public Signature() { 29 super(size); 30 acceptingCycleId = Long.MAX_VALUE; 31 } 32 33 38 public static void setSize(int _size) { 39 size = _size; 40 } 41 42 46 public static int getSize() { 47 return size; 48 } 49 50 54 public boolean equals(Object o) { 55 if (o instanceof Signature) 56 return (super.equals(o)); 57 else 58 return false; 59 60 } 61 62 65 public boolean isAcceptingReachable() { 66 return ((acceptingCycleId >>> 63) & 1) != 0; 67 } 68 69 72 public void setAcceptingReachable(boolean accepting) { 73 if (accepting) 74 acceptingCycleId |= ((long)1 << 63); 75 else 76 acceptingCycleId &= (~((long)1 << 63)); 77 } 78 79 83 public void setCycleId(long id) { 84 acceptingCycleId = id | (((acceptingCycleId >>> 63) & 1) << 63); 85 } 86 87 91 public long getCycleId() { 92 return acceptingCycleId & (~((long)1 << 63)); 93 } 94 95 99 public void concat(Signature second) { 100 super.concat(second); 101 } 102 103 107 public String toString() { 108 return super.toString(); 109 } 110 111 113 116 static private int size = 0; 117 118 122 public long acceptingCycleId; 123 124 } 125 126 | Popular Tags |