aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-graph
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2014-10-10 00:01:22 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2014-10-10 00:01:23 +0200
commit736c775bfc2cde38a53e4d43f858d3a3b6728c34 (patch)
treecaee18e0a6007e19e8ee81d64a2b1e8dfe17a847 /sonar-graph
parent7d562d641868532e5edbd6f03fac739eff9bcc90 (diff)
downloadsonarqube-736c775bfc2cde38a53e4d43f858d3a3b6728c34.tar.gz
sonarqube-736c775bfc2cde38a53e4d43f858d3a3b6728c34.zip
Add missing @Override annotations
Diffstat (limited to 'sonar-graph')
-rw-r--r--sonar-graph/src/main/java/org/sonar/graph/DirectedGraph.java5
-rw-r--r--sonar-graph/src/main/java/org/sonar/graph/FeedbackCycle.java2
-rw-r--r--sonar-graph/src/main/java/org/sonar/graph/FeedbackEdge.java1
-rw-r--r--sonar-graph/src/main/java/org/sonar/graph/StringEdge.java3
-rw-r--r--sonar-graph/src/main/java/org/sonar/graph/StringEdgeFactory.java2
5 files changed, 13 insertions, 0 deletions
diff --git a/sonar-graph/src/main/java/org/sonar/graph/DirectedGraph.java b/sonar-graph/src/main/java/org/sonar/graph/DirectedGraph.java
index 6372ba01095..ecbb0fb6d72 100644
--- a/sonar-graph/src/main/java/org/sonar/graph/DirectedGraph.java
+++ b/sonar-graph/src/main/java/org/sonar/graph/DirectedGraph.java
@@ -84,6 +84,7 @@ public class DirectedGraph<V, E extends Edge<V>> implements DirectedGraphAccesso
edges.put(vertexKey2, edge);
}
+ @Override
public E getEdge(V from, V to) {
Map<V, E> outgoingEdgesFrom = outgoingEdgesByVertex.get(from);
if (outgoingEdgesFrom == null) {
@@ -93,6 +94,7 @@ public class DirectedGraph<V, E extends Edge<V>> implements DirectedGraphAccesso
}
}
+ @Override
public boolean hasEdge(V from, V to) {
Map<V, E> outgoingEdges = outgoingEdgesByVertex.get(from);
if (outgoingEdges == null) {
@@ -111,6 +113,7 @@ public class DirectedGraph<V, E extends Edge<V>> implements DirectedGraphAccesso
}
}
+ @Override
public Set<V> getVertices() {
return vertices;
}
@@ -126,6 +129,7 @@ public class DirectedGraph<V, E extends Edge<V>> implements DirectedGraphAccesso
return result;
}
+ @Override
public Collection<E> getOutgoingEdges(V from) {
Map<V, E> outgoingEdges = outgoingEdgesByVertex.get(from);
if (outgoingEdges == null) {
@@ -134,6 +138,7 @@ public class DirectedGraph<V, E extends Edge<V>> implements DirectedGraphAccesso
return outgoingEdges.values();
}
+ @Override
public Collection<E> getIncomingEdges(V to) {
Map<V, E> incomingEdges = incomingEdgesByVertex.get(to);
if (incomingEdges == null) {
diff --git a/sonar-graph/src/main/java/org/sonar/graph/FeedbackCycle.java b/sonar-graph/src/main/java/org/sonar/graph/FeedbackCycle.java
index 43125a0e932..81de9669e43 100644
--- a/sonar-graph/src/main/java/org/sonar/graph/FeedbackCycle.java
+++ b/sonar-graph/src/main/java/org/sonar/graph/FeedbackCycle.java
@@ -87,10 +87,12 @@ public final class FeedbackCycle implements Iterable<FeedbackEdge>, Comparable<F
return totalOccurrencesOfEdgesInCycle;
}
+ @Override
public Iterator<FeedbackEdge> iterator() {
return orderedFeedbackEdges.iterator();
}
+ @Override
public int compareTo(FeedbackCycle feedbackCycle) {
if (getTotalOccurrencesOfEdgesInCycle() < feedbackCycle.getTotalOccurrencesOfEdgesInCycle()) {//NOSONAR this class has a natural ordering that is inconsistent with equals
return -1;
diff --git a/sonar-graph/src/main/java/org/sonar/graph/FeedbackEdge.java b/sonar-graph/src/main/java/org/sonar/graph/FeedbackEdge.java
index 529efe8bda2..6e24a466058 100644
--- a/sonar-graph/src/main/java/org/sonar/graph/FeedbackEdge.java
+++ b/sonar-graph/src/main/java/org/sonar/graph/FeedbackEdge.java
@@ -51,6 +51,7 @@ public class FeedbackEdge implements Comparable<FeedbackEdge> {
return occurences;
}
+ @Override
public int compareTo(FeedbackEdge feedbackEdge) {
if (this.getRelativeWeight() < feedbackEdge.getRelativeWeight()) {
return -1;
diff --git a/sonar-graph/src/main/java/org/sonar/graph/StringEdge.java b/sonar-graph/src/main/java/org/sonar/graph/StringEdge.java
index 11168ca8663..c5aa7bb1844 100644
--- a/sonar-graph/src/main/java/org/sonar/graph/StringEdge.java
+++ b/sonar-graph/src/main/java/org/sonar/graph/StringEdge.java
@@ -38,14 +38,17 @@ public class StringEdge implements Edge<String> {
this.weight = weight;
}
+ @Override
public String getFrom() {
return from;
}
+ @Override
public String getTo() {
return to;
}
+ @Override
public int getWeight() {
return weight;
}
diff --git a/sonar-graph/src/main/java/org/sonar/graph/StringEdgeFactory.java b/sonar-graph/src/main/java/org/sonar/graph/StringEdgeFactory.java
index 7d77959d996..a7dd4dee50c 100644
--- a/sonar-graph/src/main/java/org/sonar/graph/StringEdgeFactory.java
+++ b/sonar-graph/src/main/java/org/sonar/graph/StringEdgeFactory.java
@@ -21,10 +21,12 @@ package org.sonar.graph;
public class StringEdgeFactory implements EdgeFactory<String, StringEdge> {
+ @Override
public StringEdge createEdge(String from, String to) {
return new StringEdge(from, to);
}
+ @Override
public StringEdge createEdge(String from, String to, int weight) {
return new StringEdge(from, to, weight);
}