1 51 52 package org.objectweb.jass.as; 53 54 import javax.activity.GlobalId ; 55 56 62 public class ActivityIdImpl implements GlobalId , java.io.Serializable { 63 64 private byte[] id = null; 66 67 69 73 public ActivityIdImpl(byte[] globalId) { 74 this.id = globalId; 75 } 76 77 79 84 public byte[] toBytes() { 85 return id; 86 } 87 88 93 public boolean equals(Object obj) { 94 if (obj == this) 95 return true; 96 if (obj instanceof ActivityIdImpl) { 97 ActivityIdImpl other = (ActivityIdImpl) obj; 98 99 if (id.length != other.id.length) 100 return false; 101 102 for (int i = 0; i < id.length; ++i) 103 if (id[i] != other.id[i]) 104 return false; 105 106 return true; 107 } 108 return false; 109 } 110 111 119 public java.lang.String print() { 120 if (id == null) 121 return "[NULL ActivityId]"; 122 String s = "http://" + new String (id); 124 125 return s; 126 } 127 } 128 | Popular Tags |