Skip to content

Commit f07ffac

Browse files
committed
Add a toString method to Either
1 parent f746b26 commit f07ffac

File tree

1 file changed

+5
-0
lines changed
  • java/client/src/org/openqa/selenium/internal

1 file changed

+5
-0
lines changed

java/client/src/org/openqa/selenium/internal/Either.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,9 @@ public Iterator<B> iterator() {
7373
public Stream<B> stream() {
7474
return Stream.of(right());
7575
}
76+
77+
@Override
78+
public String toString() {
79+
return "[Either(" + (isLeft() ? "left" : "right") + "): " + (isLeft() ? left() : right()) + "]";
80+
}
7681
}

0 commit comments

Comments
 (0)