All Downloads are FREE. Search and download functionalities are using the official Maven repository.

pl.allegro.tech.hermes.common.kafka.offset.PartitionOffsets Maven / Gradle / Ivy

The newest version!
package pl.allegro.tech.hermes.common.kafka.offset;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class PartitionOffsets implements Iterable {

  private final List offsets = new ArrayList<>();

  public PartitionOffsets add(PartitionOffset offset) {
    offsets.add(offset);
    return this;
  }

  public PartitionOffsets addAll(PartitionOffsets offsets) {
    offsets.forEach(this::add);
    return this;
  }

  @Override
  public Iterator iterator() {
    return offsets.iterator();
  }

  public boolean isEmpty() {
    return offsets.isEmpty();
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy