Skip to content

Commit

Permalink
EndpointPair.java: s/adjacentNode(Object Node)/adjacentNode(N node)/
Browse files Browse the repository at this point in the history
RELNOTES=`graph`: Make `EndpointPair.adjacentNode` require an `N` instead of accept any `Object`.
PiperOrigin-RevId: 371380054
  • Loading branch information
java-team-github-bot authored and Google Java Core Libraries committed Apr 30, 2021
1 parent 4cacc0e commit b0be21d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public final N nodeV() {
*
* @throws IllegalArgumentException if this {@link EndpointPair} does not contain {@code node}
*/
public final N adjacentNode(Object node) {
public final N adjacentNode(N node) {
if (node.equals(nodeU)) {
return nodeV;
} else if (node.equals(nodeV)) {
Expand Down
2 changes: 1 addition & 1 deletion guava/src/com/google/common/graph/EndpointPair.java
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public final N nodeV() {
*
* @throws IllegalArgumentException if this {@link EndpointPair} does not contain {@code node}
*/
public final N adjacentNode(Object node) {
public final N adjacentNode(N node) {
if (node.equals(nodeU)) {
return nodeV;
} else if (node.equals(nodeV)) {
Expand Down

0 comments on commit b0be21d

Please sign in to comment.