public TPathEntry deepCopy() { return new TPathEntry(this); }
/** * Performs a deep copy on <i>other</i>. */ public TPathsDump(TPathsDump other) { __isset_bitfield = other.__isset_bitfield; this.rootId = other.rootId; if (other.isSetNodeMap()) { Map<Integer,TPathEntry> __this__nodeMap = new HashMap<Integer,TPathEntry>(); for (Map.Entry<Integer, TPathEntry> other_element : other.nodeMap.entrySet()) { Integer other_element_key = other_element.getKey(); TPathEntry other_element_value = other_element.getValue(); Integer __this__nodeMap_copy_key = other_element_key; TPathEntry __this__nodeMap_copy_value = new TPathEntry(other_element_value); __this__nodeMap.put(__this__nodeMap_copy_key, __this__nodeMap_copy_value); } this.nodeMap = __this__nodeMap; } }
private Tuple createTPathEntry(Entry entry, AtomicInteger idCounter, Map<Integer, TPathEntry> idMap) { int myId = idCounter.incrementAndGet(); TPathEntry tEntry = new TPathEntry(entry.getType().getByte(), entry.getPathElement(), new HashSet<Integer>()); if (entry.getAuthzObjs().size() != 0) { tEntry.setAuthzObjs(entry.getAuthzObjs()); } idMap.put(myId, tEntry); return new Tuple(tEntry, myId); }
_val51 = new TPathEntry(); _val51.read(iprot); struct.nodeMap.put(_key50, _val51);
@Override public void read(org.apache.thrift.protocol.TProtocol prot, TPathsDump struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.rootId = iprot.readI32(); struct.setRootIdIsSet(true); { org.apache.thrift.protocol.TMap _map54 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.nodeMap = new HashMap<Integer,TPathEntry>(2*_map54.size); for (int _i55 = 0; _i55 < _map54.size; ++_i55) { int _key56; // required TPathEntry _val57; // required _key56 = iprot.readI32(); _val57 = new TPathEntry(); _val57.read(iprot); struct.nodeMap.put(_key56, _val57); } } struct.setNodeMapIsSet(true); } }