Repository: apache/kafka
File: clients/src/main/java/org/apache/kafka/clients/admin/SharePartitionOffsetInfo.java (Java)

Code before:
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.kafka.clients.admin;

import org.apache.kafka.common.annotation.InterfaceStability;

import java.util.Objects;
import java.util.Optional;

/**
 * This class is used to contain the offset and lag information for a share-partition.
 */
@InterfaceStability.Evolving
public class SharePartitionOffsetInfo {
    private final long startOffset;
    private final Optional<Integer> leaderEpoch;
    private final Optional<Long> lag;

    /**
     * Construct a new StartPartitionOffsetInfo.
     *
     * @param startOffset The share-partition start offset
     * @param leaderEpoch The optional leader epoch of the start offset
     * @param lag         The optional lag for the share-partition
     */
    public SharePartitionOffsetInfo(long startOffset, Optional<Integer> leaderEpoch, Optional<Long> lag) {
        this.startOffset = startOffset;
        this.leaderEpoch = leaderEpoch;
        this.lag = lag;
    }

    public long startOffset() {
        return startOffset;
    }

    public Optional<Integer> leaderEpoch() {
        return leaderEpoch;
    }

    public Optional<Long> lag() {
        return lag;
    }

    @Override
    public boolean equals(Object o) {

Review comment (suggestion):
```suggestion
     * Construct a new SharePartitionOffsetInfo.
```

Code after:
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.kafka.clients.admin;

import org.apache.kafka.common.annotation.InterfaceStability;

import java.util.Objects;
import java.util.Optional;

/**
 * This class is used to contain the offset and lag information for a share-partition.
 */
@InterfaceStability.Evolving
public class SharePartitionOffsetInfo {
    private final long startOffset;
    private final Optional<Integer> leaderEpoch;
    private final Optional<Long> lag;

    /**
     * Construct a new SharePartitionOffsetInfo.
     *
     * @param startOffset The share-partition start offset
     * @param leaderEpoch The optional leader epoch of the share-partition
     * @param lag         The optional lag for the share-partition
     */
    public SharePartitionOffsetInfo(long startOffset, Optional<Integer> leaderEpoch, Optional<Long> lag) {
        this.startOffset = startOffset;
        this.leaderEpoch = leaderEpoch;
        this.lag = lag;
    }

    public long startOffset() {
        return startOffset;
    }

    public Optional<Integer> leaderEpoch() {
        return leaderEpoch;
    }

    public Optional<Long> lag() {
        return lag;
    }

    @Override
    public boolean equals(Object o) {