1 package org.matsim.core.population.routes.mediumcompressed;
9 import java.util.ArrayList;
10 import java.util.Collections;
11 import java.util.List;
42 int linkCount = linkIds == null ? 0 : linkIds.size();
43 int[] route =
new int[linkCount];
45 if (linkIds != null) {
47 route[i] = linkId.index();
56 if (this.route == null || this.route == EMPTY_ROUTE) {
57 return Collections.emptyList();
60 List<Id<Link>> linkIds =
new ArrayList<>(idxRoute.length);
61 for (
int linkIndex : idxRoute) {
62 linkIds.add(
Id.
get(linkIndex,
Link.class));
static< T > Id< T > get(int index, final Class< T > type)
static long decode(ByteBuffer bb)
static final byte [] EMPTY_ROUTE
void setLinkIds(Id< Link > startLinkId, List< Id< Link >> linkIds, Id< Link > endLinkId)
void setStartLinkId(Id< Link > linkId)
static void encode(ByteBuffer bb, long x)
MediumCompressedNetworkRoute clone()
MediumCompressedNetworkRoute(Id< Link > startLinkId, Id< Link > endLinkId)
void setEndLinkId(Id< Link > linkId)
List< Id< Link > > getLinkIds()