diff options
Diffstat (limited to 'org.jacoco.core/src/org/jacoco/core/analysis/NodeComparator.java')
-rw-r--r-- | org.jacoco.core/src/org/jacoco/core/analysis/NodeComparator.java | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/org.jacoco.core/src/org/jacoco/core/analysis/NodeComparator.java b/org.jacoco.core/src/org/jacoco/core/analysis/NodeComparator.java index 3fea25fb..85058f93 100644 --- a/org.jacoco.core/src/org/jacoco/core/analysis/NodeComparator.java +++ b/org.jacoco.core/src/org/jacoco/core/analysis/NodeComparator.java @@ -1,13 +1,14 @@ /******************************************************************************* - * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html + * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors + * This program and the accompanying materials are made available under + * the terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Marc R. Hoffmann - initial API and implementation - * + * *******************************************************************************/ package org.jacoco.core.analysis; @@ -23,7 +24,7 @@ import org.jacoco.core.analysis.ICoverageNode.CounterEntity; /** * Comparator to compare {@link ICoverageNode} objects by different counter * criteria. - * + * * @see CounterComparator#on(ICoverageNode.CounterEntity) */ public class NodeComparator implements Comparator<ICoverageNode>, Serializable { @@ -42,10 +43,10 @@ public class NodeComparator implements Comparator<ICoverageNode>, Serializable { /** * Creates a new composite comparator with a second search criterion. - * + * * @param second * second criterion comparator - * + * * @return composite comparator */ public NodeComparator second(final Comparator<ICoverageNode> second) { @@ -65,14 +66,15 @@ public class NodeComparator implements Comparator<ICoverageNode>, Serializable { /** * Returns a sorted copy of the given collection of {@link ICoverageNode} * elements. - * + * * @param <T> * actual type of the elements * @param summaries * collection to create a copy of * @return sorted copy */ - public <T extends ICoverageNode> List<T> sort(final Collection<T> summaries) { + public <T extends ICoverageNode> List<T> sort( + final Collection<T> summaries) { final List<T> result = new ArrayList<T>(summaries); Collections.sort(result, this); return result; |