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

com.google.sitebricks.mail.imap.Folder Maven / Gradle / Ivy

The newest version!
package com.google.sitebricks.mail.imap;

/**
 * Simple data object that represents an IMAP folder.
 *
 * @author [email protected] (Dhanji R. Prasanna)
 */
public class Folder {
  private final String name;
  private final int count;
  private final int nextUid;

  public Folder(String name, int count, int nextUid) {
    this.name = name;
    this.count = count;
    this.nextUid = nextUid;
  }

  public int getCount() {
    return count;
  }

  public String getName() {
    return name;
  }

  public int getNextUid() {
    return nextUid;
  }

    @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (!(o instanceof Folder)) return false;

    Folder folder = (Folder) o;

    if (name != null ? !name.equals(folder.name) : folder.name != null) return false;

    return true;
  }

  @Override
  public int hashCode() {
    return name != null ? name.hashCode() : 0;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy