public RouteInfo deepCopy() { return new RouteInfo(this); }
/** * Performs a deep copy on <i>other</i>. */ public EventRoute(EventRoute other) { if (other.isSetUserId()) { this.userId = other.userId; } if (other.isSetTenantId()) { this.tenantId = other.tenantId; } if (other.isSetRouteInfo()) { List<RouteInfo> __this__routeInfo = new ArrayList<RouteInfo>(other.routeInfo.size()); for (RouteInfo other_element : other.routeInfo) { __this__routeInfo.add(new RouteInfo(other_element)); } this.routeInfo = __this__routeInfo; } if (other.isSetOperationsServerId()) { this.operationsServerId = other.operationsServerId; } }
for (int _i10 = 0; _i10 < _list8.size; ++_i10) _elem9 = new RouteInfo(); _elem9.read(iprot); struct.routeInfo.add(_elem9);
/** * Transform Collection(RouteInfo) into List(EventRoute). * * @param routeInfos Collection(RouteInfo) * @return List(EventRoute) */ private List<EventRoute> transformEventRouteFromRouteInfoCollection( Collection<RouteInfo> routeInfos) { List<EventRoute> routes = new ArrayList<>(); HashMap<UserTenantKey, List<org.kaaproject.kaa.server.common.thrift.gen.operations.RouteInfo>> routeInfosTh = new HashMap<>(); // NOSONAR for (RouteInfo ri : routeInfos) { org.kaaproject.kaa.server.common.thrift.gen.operations.RouteInfo riTh = new org.kaaproject.kaa.server.common.thrift.gen.operations.RouteInfo( transformUpdateType(ri.getRouteOperation()), transformEcfv(ri.getEcfVersions()), ri.getAddress().getApplicationToken(), ByteBuffer.wrap(ri.getAddress().getEndpointKey().getData())); UserTenantKey key = new UserTenantKey(ri.getUserId(), ri.getTenantId()); if (!routeInfosTh.containsKey(key)) { routeInfosTh.put(key, new ArrayList<>()); } routeInfosTh.get(key).add(riTh); } for (UserTenantKey key : routeInfosTh.keySet()) { routes.add(new EventRoute(key.getUserId(), key.getTenantId(), routeInfosTh.get(key), id)); } return routes; }
for (int _i15 = 0; _i15 < _list13.size; ++_i15) _elem14 = new RouteInfo(); _elem14.read(iprot); struct.routeInfo.add(_elem14);
routes.add(new RouteInfo(address, maskLength, metric));