1 package org.matsim.counts;
13 import java.util.TreeMap;
14 import java.util.stream.Collectors;
39 if (this.locations.containsKey(
id)) {
44 this.locations.put(
id, loc);
85 return locations.values().stream()
86 .map(MeasurementLocation::getMeasurables)
87 .flatMap(e -> e.keySet().stream())
89 .collect(Collectors.toSet());
97 return this.locations.get(
id);
126 TreeMap<Id<T>,
Count<T>> result =
new TreeMap<>();
129 result.put(e.getKey(),
new Count<>(e.getValue()));
141 return loc == null ? null :
new Count<>(loc);
152 return "[name=" + this.name +
"]" +
"[nof_locations=" + this.locations.size() +
"]";
MatsimFactory getFactory()
Count< T > getCount(final Id< T > locId)
void setSource(String source)
final TreeMap< Id< T >, Count< T > > getCounts()
MeasurementLocation< T > createAndAddMeasureLocation(final Id< T > id, String stationName)
Attributes getAttributes()
void setName(String name)
Map< Id< T >, MeasurementLocation< T > > getMeasureLocations()
final Map< Id< T >, MeasurementLocation< T > > locations
void setDescription(String description)
static final String ELEMENT_NAME
final Attributes attributes
Set< String > getMeasurableTypes()
final Count< T > createAndAddCount(final Id< T > linkId, final String stationName)
Old API.
MeasurementLocation< T > getMeasureLocation(Id< T > id)