CPD Results
The following document contains the results of PMD's CPD 7.7.0.
Duplications
| File |
Line |
| org/opentrafficsim/core/perception/collections/HistoricalHashMap.java |
43 |
| org/opentrafficsim/core/perception/collections/HistoricalLinkedHashMap.java |
43 |
public HistoricalHashMap(final HistoryManager historyManager, final Object owner, final Map<? extends K, ? extends V> m)
{
super(historyManager, owner, new LinkedHashMap<>(m));
}
@Override
public LinkedHashMap<K, V> get()
{
return getMap();
}
@Override
public LinkedHashMap<K, V> get(final Duration time)
{
if (isLastState(time))
{
return getMap();
}
return fill(time, new LinkedHashMap<>());
}
@Override
public String toString()
{
return "HistoricalHashMap [current=" + getMap() + "]"; |
| File |
Line |
| org/opentrafficsim/core/network/Node.java |
213 |
| org/opentrafficsim/core/network/Node.java |
273 |
}
// ------------------------------------------- make datasets if needed
if (this.connections == null)
{
this.connections = new LinkedHashMap<>();
}
if (!this.connections.containsKey(gtuType))
{
this.connections.put(gtuType, new LinkedHashMap<>());
}
Map<Link, Set<Link>> gtuMap = this.connections.get(gtuType);
if (!gtuMap.containsKey(incomingLink))
{
gtuMap.put(incomingLink, new LinkedHashSet<>());
}
// ------------------------------------------- add the connection
gtuMap.get(incomingLink).add(outgoingLink); |