@Override
  public boolean equals(Object obj) {
    if (this == obj)
      return true;
    if (obj == null)
      return false;
    if (getClass() != obj.getClass())
      return false;
    Partition other = (Partition) obj;
    if (partition != other.partition)
      return false;
    return true;
  }
Constructs a new Samza stream partition from a specified partition number.
@param partition An integer identifying the partition in a Samza stream.
samza-api/src/main/java/org/apache/samza/Partition.java