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); } }
public Object get(FragmentP2P f) { if (this.contains(f)) { return localRoute.get(f.toInt()); } else { return null; } }
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); } } }
public boolean contains(FragmentP2P f) { return localRoute.containsKey(f.toInt()); }
public void remove(FragmentP2P f) { this.localRoute.remove(f.toInt()); }