jsancio commented on a change in pull request #10276:
URL: https://github.com/apache/kafka/pull/10276#discussion_r596994002



##########
File path: raft/src/main/java/org/apache/kafka/raft/ValidOffsetAndEpoch.java
##########
@@ -16,40 +16,56 @@
  */
 package org.apache.kafka.raft;
 
+import java.util.Objects;
+
 public final class ValidOffsetAndEpoch {
-    final private Type type;
+    final private Kind kind;

Review comment:
       Yeah. What makes the suggested design pattern nice in Scala is that the 
companion objects for `case class` have an `unapply` method for pattern 
matching.
   
   For what it is worth. I thought about this design when implementing 
`ValidOffsetAndEpoch` but found the current design more user friendly in Java.
   
   I am all for changing the name of `ValidOffsetAndEpoch`. I was never happy 
with the name.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to