예제 #1
0
 public void add(FragmentP2P f, String path) {
   if (!this.contains(f)) {
     localRoute.put(f.toInt(), path);
   } else {
     localRoute.remove(f.toInt());
     localRoute.put(f.toInt(), path);
   }
 }
예제 #2
0
 public Object get(FragmentP2P f) {
   if (this.contains(f)) {
     return localRoute.get(f.toInt());
   } else {
     return null;
   }
 }
예제 #3
0
 public boolean add(FragmentP2P f, BFP2P bf) {
   if (!this.contains(f)) {
     LocalContainerP2P c = new LocalContainerP2P(limit);
     c.add(bf);
     localRoute.put(f.toInt(), c);
     return true;
   } else {
     if ((((this.get(f)).getClass()).getName()).equals("java.lang.String")) {
       return false;
     } else {
       return ((LocalContainerP2P) this.get(f)).add(bf);
     }
   }
 }
예제 #4
0
 public boolean contains(FragmentP2P f) {
   return localRoute.containsKey(f.toInt());
 }
예제 #5
0
 public void remove(FragmentP2P f) {
   this.localRoute.remove(f.toInt());
 }